#include <pspsdk.h>
#include "vshmain.h"

/*
 * Imports from library: sceGe_user
 */
extern void sceGe_user_03444EB4 (int arg1, int arg2);
extern int sceGe_user_AB49E76A (int arg1, int arg2, int arg3, int arg4);
extern void sceGe_user_B287BD61 (int arg1);

/*
 * Imports from library: sceHttp
 */
extern int sceHttp_87797BDD (int arg1, int arg2);
extern int sceHttp_AB1ABE07 (int arg1);
extern int sceHttp_D1C8945E ();
extern int sceHttp_E4D21302 (int arg1, int arg2, int arg3, int arg4);
extern int sceHttp_F9D8EB63 ();

/*
 * Imports from library: sceNet
 */
extern int sceNet_281928A9 ();
extern int sceNet_39AF39A6 (int arg1, int arg2, int arg3, int arg4, int arg5);

/*
 * Imports from library: sceNetInet
 */
extern int sceNetInet_17943399 ();
extern int sceNetInet_A9ED66B9 ();

/*
 * Imports from library: sceNetResolver
 */
extern int sceNetResolver_6138194A ();
extern int sceNetResolver_F3370E61 ();

/*
 * Imports from library: sceNetApctl
 */
extern int sceNetApctl_B3EDD0EC ();
extern int sceNetApctl_E2F91F9B (int arg1, int arg2);

/*
 * Imports from library: sceNetAdhocctl
 */
extern int sceNetAdhocctl_9D689E13 ();
extern int sceNetAdhocctl_E26F226E (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceNp
 */
extern void sceNp_37E1E274 ();
extern int sceNp_857B47D3 ();

/*
 * Imports from library: sceNpAuth
 */
extern void sceNpAuth_4EC1F667 ();
extern int sceNpAuth_A1DE86F8 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceNpService
 */
extern void sceNpService_00ACFAC3 ();
extern int sceNpService_0F8F5821 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceNpCommerce2
 */
extern int sceNpCommerce2_0E9956E3 ();
extern void sceNpCommerce2_A5A34EA4 ();

/*
 * Imports from library: sceNpCommerce2Store
 */
extern int sceNpCommerce2Store_370974DD ();
extern void sceNpCommerce2Store_6D83DC19 ();

/*
 * Imports from library: sceNpCommerce2RegCam
 */
extern void sceNpCommerce2RegCam_2F5B9CE8 ();
extern int sceNpCommerce2RegCam_DBC420F0 ();

/*
 * Imports from library: scePspNpDrm_user
 */
extern int scePspNpDrm_user_08D98894 (int arg1);

/*
 * Imports from library: sceSsl
 */
extern int sceSsl_191CDEFF ();
extern int sceSsl_957ECBE2 (int arg1);

/*
 * Imports from library: sceUtility_netparam_internal
 */
extern int sceUtility_netparam_internal_F547B8FC (int arg1);

/*
 * Imports from library: sceResmgr
 */
extern int sceResmgr_9DC14891 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceMlnBridge
 */
extern int sceMlnBridge_6DEA83B1 (int arg1, int arg2, int arg3);

/*
 * Imports from library: SysMemUserForUser
 */
extern void SysMemUserForUser_91DE343C (int arg1);
extern int SysMemUserForUser_ACBD88CA ();
extern void SysMemUserForUser_F77D77CB (int arg1);

/*
 * Imports from library: sceDisplay
 */
extern int sceDisplay_9C6EAAD7 ();

/*
 * Imports from library: sceReg
 */
extern void sceReg_0CAE832B (int arg1);
extern void sceReg_0D69BF40 (int arg1);
extern int sceReg_17768E14 (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_1D8A762E (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_30BE0259 (int arg1, int arg2, int arg3, int arg4);
extern void sceReg_39461B4D (int arg1);
extern int sceReg_57641A81 (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_92E41280 (int arg1, int arg2, int arg3);
extern int sceReg_C5768D02 (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_DEDA92BF (int arg1);
extern void sceReg_FA8A5739 (int arg1);

/*
 * Imports from library: sceRtc
 */
extern int sceRtc_3F7AD767 (int arg1);
extern int sceRtc_57726BC1 (int arg1, int arg2, int arg3);
extern void sceRtc_6A676D2D (int arg1);
extern int sceRtc_6FF40ACC (int arg1, int arg2);
extern int sceRtc_7ED29E40 (int arg1, int arg2);
extern int sceRtc_C2DDBEB5 (int arg1);
extern void sceRtc_E51B4B7A (int arg1, int arg2, int arg3);
extern int sceRtc_FB3B18CD (int arg1);

/*
 * Imports from library: sceUsb
 */
extern void sceUsb_89DE0DC5 (int arg1);
extern int sceUsb_8BFC3DE8 (int arg1, int arg2, int arg3);
extern int sceUsb_AE5DE6AF (int arg1, int arg2, int arg3);
extern void sceUsb_C2464FA0 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceVshBridge
 */
extern int sceVshBridge_0FB106ED (int arg1, int arg2);
extern int sceVshBridge_16C1E82E (int arg1, int arg2);
extern int sceVshBridge_1FD498B6 (int arg1, int arg2, int arg3);
extern int sceVshBridge_2380DC08 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void sceVshBridge_263DDFCF (int arg1, int arg2);
extern int sceVshBridge_2EB0812A ();
extern int sceVshBridge_308E9377 (int arg1, int arg2);
extern int sceVshBridge_38456405 (int arg1, int arg2);
extern int sceVshBridge_44DBAED5 (int arg1);
extern int sceVshBridge_49B2179B (int arg1, int arg2);
extern int sceVshBridge_4A596D2D (int arg1, int arg2);
extern int sceVshBridge_4DB43867 (int arg1, int arg2, int arg3, int arg4);
extern int sceVshBridge_5185BF94 (int arg1, int arg2);
extern int sceVshBridge_524EE9AE (int arg1, int arg2, int arg3);
extern int sceVshBridge_53BFD101 (int arg1);
extern void sceVshBridge_5701773B (int arg1);
extern int sceVshBridge_59661973 (int arg1, int arg2);
extern int sceVshBridge_5C2983C2 (int arg1, int arg2);
extern int sceVshBridge_5E399F7B (int arg1, int arg2);
extern int sceVshBridge_61001D64 (int arg1);
extern int sceVshBridge_639C3CB3 (int arg1);
extern int sceVshBridge_6CAEB765 (int arg1);
extern void sceVshBridge_73C84D1F (int arg1, int arg2);
extern void sceVshBridge_74DA9D25 (int arg1, int arg2);
extern void sceVshBridge_77E6E39A (int arg1);
extern void sceVshBridge_7B1BB05F (int arg1);
extern void sceVshBridge_7D3BB7EB (int arg1);
extern void sceVshBridge_7E00040D (int arg1);
extern void sceVshBridge_85516E53 (int arg1, int arg2);
extern void sceVshBridge_8D3EB758 (int arg1);
extern void sceVshBridge_934E0FAF ();
extern int sceVshBridge_A5628F0D (int arg1, int arg2, int arg3);
extern int sceVshBridge_A71BF332 ();
extern int sceVshBridge_A7401037 (int arg1);
extern int sceVshBridge_A8374B9D ();
extern void sceVshBridge_AA2605A0 (int arg1, int arg2, int arg3);
extern void sceVshBridge_B58B4CAE (int arg1);
extern void sceVshBridge_C3316528 (int arg1);
extern void sceVshBridge_C6395C03 (int arg1, int arg2);
extern void sceVshBridge_C949966C (int arg1);
extern int sceVshBridge_CE32CBEF ();
extern int sceVshBridge_CE60CEA6 (int arg1, int arg2);
extern void sceVshBridge_CF5FBCE7 ();
extern int sceVshBridge_E174218C (int arg1, int arg2, int arg3);
extern void sceVshBridge_E5DA5E95 ();
extern int sceVshBridge_E9C1F4E2 (int arg1, int arg2);

/*
 * Imports from library: sceVshCommonGui
 */
extern void sceVshCommonGui_0555C757 (int arg1);
extern void sceVshCommonGui_15B33BDE (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
extern void sceVshCommonGui_25489D52 (int arg1, int arg2);
extern void sceVshCommonGui_38855541 (int arg1);
extern int sceVshCommonGui_414454B7 ();
extern void sceVshCommonGui_565E9AE2 (int arg1);
extern void sceVshCommonGui_5AFF4B9F (int arg1, int arg2);
extern void sceVshCommonGui_6367CB49 ();
extern void sceVshCommonGui_69A07897 (int arg1, int arg2, int arg3);
extern void sceVshCommonGui_6AA43E1C (int arg1);
extern void sceVshCommonGui_759F0369 ();
extern void sceVshCommonGui_82938BF0 ();
extern void sceVshCommonGui_A745DB12 (int arg1);
extern void sceVshCommonGui_B298063A ();
extern int sceVshCommonGui_B3B020CB (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
extern void sceVshCommonGui_B5EB251D (int arg1);
extern void sceVshCommonGui_DC4D90A3 (int arg1, int arg2, int arg3, int arg4);
extern void sceVshCommonGui_FA85A7E1 (int arg1);

/*
 * Imports from library: sceVshCommonUtil
 */
extern int sceVshCommonUtil_2D4BC09F (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_3A1EA724 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void sceVshCommonUtil_3DCE48A0 (int arg1, int arg2);
extern int sceVshCommonUtil_5750B4DE (int arg1, int arg2, int arg3, int arg4);
extern void sceVshCommonUtil_625A9A5D (int arg1);
extern int sceVshCommonUtil_652E90E0 (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_6BC2A336 (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_79ACE8F4 (int arg1, int arg2);
extern int sceVshCommonUtil_7A73DC84 (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_80311468 (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_922DB51D (int arg1, int arg2);
extern void sceVshCommonUtil_AED013BF (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_AFFAEAAD (int arg1, int arg2, int arg3, int arg4);
extern void sceVshCommonUtil_B3F4BEA8 (int arg1, int arg2);
extern void sceVshCommonUtil_B5C86FBB (int arg1);
extern void sceVshCommonUtil_CFD3381F (int arg1, int arg2);
extern void sceVshCommonUtil_D515D288 ();
extern void sceVshCommonUtil_D87E8E2D (int arg1, int arg2);
extern void sceVshCommonUtil_E05A087C (int arg1);
extern void sceVshCommonUtil_F99D2D50 ();
extern void sceVshCommonUtil_FEC4598F (int arg1, int arg2);

/*
 * Imports from library: scePaf
 */
extern void scePaf_0034216F (int arg1);
extern void scePaf_024052D4 ();
extern void scePaf_043C75D2 (int arg1);
extern void scePaf_047C9996 (int arg1, int arg2, int arg3);
extern void scePaf_06172A6E (int arg1);
extern int scePaf_07A14F5B (int arg1, int arg2);
extern void scePaf_07C50769 (int arg1, int arg2, int arg3);
extern void scePaf_08CA8950 (int arg1, int arg2, int arg3);
extern int scePaf_08EA7580 ();
extern void scePaf_09FAB385 (int arg1, int arg2);
extern int scePaf_0A6D0925 (int arg1, int arg2);
extern void scePaf_0C07B7EC (int arg1, int arg2, int arg3);
extern int scePaf_0D5BAC93 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_0E14B0B1 (int arg1, int arg2);
extern void scePaf_0FD1E3BB (int arg1, int arg2, int arg3);
extern void scePaf_10882478 (int arg1);
extern int scePaf_1183E654 (int arg1, int arg2);
extern void scePaf_11EFC5FD (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_11FA6015 (int arg1, int arg2, int arg3);
extern void scePaf_137D0EB1 (int arg1);
extern void scePaf_156FBB30 (int arg1);
extern void scePaf_15AFC8D3 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_164FFBB8 (int arg1);
extern int scePaf_17EAEC8C (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_19E81926 (int arg1);
extern void scePaf_1AA1A452 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_1B0FDF28 (int arg1, int arg2);
extern void scePaf_1F166C10 (int arg1, int arg2, int arg3);
extern void scePaf_22FB4177 (int arg1);
extern int scePaf_2338483F ();
extern int scePaf_24691865 ();
extern void scePaf_24E00D5E (int arg1);
extern int scePaf_269AC167 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_2788491B (int arg1, int arg2);
extern void scePaf_27F4E35C (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_284CAB46 (int arg1);
extern int scePaf_2A73D741 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_2CFAF8C4 (int arg1, int arg2);
extern void scePaf_2D1BB6BD (int arg1);
extern void scePaf_2E4662CC (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void scePaf_30BCB0F4 ();
extern int scePaf_31AC0624 (int arg1, int arg2);
extern int scePaf_336E37F3 (int arg1, int arg2);
extern void scePaf_3447707B (int arg1, int arg2, int arg3);
extern void scePaf_36528408 (int arg1);
extern void scePaf_36C437F1 (int arg1, int arg2);
extern int scePaf_36E10086 (int arg1);
extern void scePaf_36E5FD64 ();
extern void scePaf_3762CCEE (int arg1, int arg2, int arg3);
extern void scePaf_39374DDC (int arg1, int arg2, int arg3);
extern void scePaf_393FBFD1 (int arg1);
extern void scePaf_3A81189F (int arg1, int arg2);
extern void scePaf_3C8DD7F0 (int arg1, int arg2);
extern int scePaf_407C762E (int arg1);
extern void scePaf_41D027B0 (int arg1, int arg2);
extern void scePaf_42C3EC10 (int arg1);
extern void scePaf_44653A84 (int arg1);
extern void scePaf_4508F2FA (int arg1);
extern void scePaf_4671AC75 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern int scePaf_46B03301 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_46B3EE71 (int arg1, int arg2);
extern void scePaf_4799EE9E (int arg1);
extern void scePaf_485890F9 (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_48BB05D5 (int arg1);
extern void scePaf_4A2B8028 (int arg1, int arg2, int arg3);
extern void scePaf_4A4A8444 (int arg1, int arg2);
extern int scePaf_4C947D23 ();
extern int scePaf_4DA06280 (int arg1, int arg2);
extern int scePaf_4DF95F22 (int arg1);
extern int scePaf_4E87FDFC (int arg1, int arg2);
extern void scePaf_4FEF4DB9 (int arg1, int arg2, int arg3);
extern void scePaf_509AB414 (int arg1, int arg2);
extern void scePaf_509EC334 (int arg1, int arg2);
extern void scePaf_51533BD3 (int arg1);
extern void scePaf_51AA42D2 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_52072B01 (int arg1, int arg2, int arg3);
extern void scePaf_5218E3CC (int arg1, int arg2);
extern void scePaf_531031AD (int arg1, int arg2, int arg3);
extern void scePaf_54BB1681 (int arg1, int arg2);
extern int scePaf_553637C4 (int arg1);
extern int scePaf_56833008 (int arg1);
extern void scePaf_56D1B0AA (int arg1);
extern void scePaf_57F4BB8A (int arg1, int arg2, int arg3);
extern void scePaf_58A2087F (int arg1, int arg2);
extern int scePaf_58EE9589 (int arg1, int arg2);
extern void scePaf_5A693901 (int arg1);
extern void scePaf_5A774BDC (int arg1, int arg2, int arg3);
extern int scePaf_5B988637 (int arg1, int arg2, int arg3);
extern void scePaf_5BC7BB59 (int arg1, int arg2, int arg3);
extern int scePaf_5C068AD6 (int arg1);
extern void scePaf_5CE68F1F (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_5E00570F (int arg1);
extern void scePaf_5E770EF9 ();
extern void scePaf_5FB8C90A (int arg1);
extern void scePaf_60F871BB (int arg1);
extern int scePaf_632F3E08 ();
extern void scePaf_636A02EC (int arg1, int arg2);
extern void scePaf_6439FDBC (int arg1, int arg2, int arg3);
extern void scePaf_643C10AF (int arg1, int arg2, int arg3);
extern int scePaf_6492F0ED ();
extern int scePaf_64A8F0B9 (int arg1);
extern int scePaf_64FF5B25 (int arg1, int arg2, int arg3);
extern int scePaf_65E16DDC (int arg1, int arg2);
extern void scePaf_65FDC4C5 (int arg1);
extern void scePaf_6690204E (int arg1);
extern void scePaf_6719522B (int arg1);
extern void scePaf_676BAC3B (int arg1);
extern void scePaf_68CE0A83 ();
extern void scePaf_6BEF472A (int arg1);
extern int scePaf_6CEA048C (int arg1);
extern void scePaf_6D03433C (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_6D516E8A (int arg1, int arg2, int arg3);
extern void scePaf_6E48A1BB ();
extern void scePaf_6F0AF8FE (int arg1, int arg2);
extern void scePaf_71B79831 (int arg1, int arg2, int arg3);
extern void scePaf_74D678D4 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void scePaf_74FA9C70 (int arg1, int arg2, int arg3);
extern void scePaf_75D8CDC6 (int arg1, int arg2, int arg3);
extern void scePaf_78FCC6CC (int arg1);
extern void scePaf_79B2405B (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int scePaf_7A618FD3 (int arg1, int arg2, int arg3);
extern void scePaf_7B15E9DC (int arg1);
extern int scePaf_7C66F326 (int arg1);
extern int scePaf_7DF2134C (int arg1, int arg2);
extern int scePaf_80885EEA (int arg1, int arg2);
extern int scePaf_811F0310 (int arg1, int arg2);
extern void scePaf_83BADBDF (int arg1, int arg2);
extern void scePaf_84551560 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
extern void scePaf_848E9F62 (int arg1, int arg2);
extern void scePaf_84A46DD7 ();
extern int scePaf_86AC3945 ();
extern void scePaf_889CD9E3 (int arg1);
extern void scePaf_88A5E3CF ();
extern void scePaf_88DB8FB1 (int arg1);
extern void scePaf_8906478F (int arg1);
extern void scePaf_8A03CEAB (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern void scePaf_8B426887 (int arg1);
extern void scePaf_8D925FB9 (int arg1, int arg2, int arg3);
extern void scePaf_8DF1417C (int arg1, int arg2, int arg3);
extern void scePaf_904D869C (int arg1, int arg2);
extern void scePaf_905DDBE2 (int arg1, int arg2);
extern void scePaf_918CB54A (int arg1, int arg2, int arg3);
extern int scePaf_937DE11C (int arg1);
extern void scePaf_94C0001B (int arg1, int arg2);
extern void scePaf_94E322DD (int arg1);
extern void scePaf_960C6893 (int arg1);
extern void scePaf_96383E99 (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_967A56EF (int arg1);
extern int scePaf_970DC20D (int arg1, int arg2);
extern void scePaf_98DE3BA6 (int arg1, int arg2);
extern void scePaf_9B240657 (int arg1, int arg2);
extern int scePaf_9B514DA5 ();
extern void scePaf_9EC2F1FF (int arg1, int arg2);
extern void scePaf_9F44CF86 (int arg1, int arg2, int arg3);
extern void scePaf_9F84F158 (int arg1, int arg2);
extern void scePaf_A0E3AAE0 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern int scePaf_A11DA28D ();
extern void scePaf_A151DD55 (int arg1, int arg2);
extern void scePaf_A1529507 (int arg1, int arg2, int arg3);
extern void scePaf_A1756BC8 (int arg1, int arg2, int arg3);
extern void scePaf_A17AE3D4 (int arg1, int arg2);
extern void scePaf_A223BF81 (int arg1);
extern void scePaf_A366A11A (int arg1, int arg2);
extern void scePaf_A6810C75 (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_A78805B0 (int arg1);
extern void scePaf_A7EB06ED (int arg1, int arg2);
extern void scePaf_A9FC7990 (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_AB9A6186 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void scePaf_ABCF9085 (int arg1, int arg2);
extern void scePaf_ACB55E4C (int arg1, int arg2, int arg3);
extern void scePaf_AD91D955 (int arg1, int arg2);
extern void scePaf_AEC1EE76 (int arg1, int arg2);
extern int scePaf_AF8BAECD (int arg1, int arg2, int arg3);
extern void scePaf_B081AAC4 (int arg1);
extern int scePaf_B117860A (int arg1, int arg2);
extern int scePaf_B18293CA (int arg1, int arg2);
extern void scePaf_B580EF60 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern int scePaf_B6ADE52D (int arg1, int arg2, int arg3);
extern void scePaf_B8853D5C ();
extern void scePaf_BA8EBE27 (int arg1, int arg2);
extern void scePaf_BC8DC92B (int arg1);
extern void scePaf_BD500444 (int arg1);
extern int scePaf_BE7032D1 (int arg1, int arg2);
extern void scePaf_BFC95DA3 (int arg1);
extern int scePaf_BFEF859E (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_C1B9E355 ();
extern int scePaf_C60EF86C (int arg1, int arg2);
extern void scePaf_C772AAD0 (int arg1, int arg2);
extern void scePaf_C89BDA36 (int arg1);
extern void scePaf_C9D0563D (int arg1, int arg2, int arg3);
extern void scePaf_CA38E212 (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_CA673A56 (int arg1, int arg2, int arg3);
extern void scePaf_CCC82881 (int arg1, int arg2);
extern void scePaf_CD2E179B (int arg1);
extern void scePaf_CD63E417 (int arg1);
extern void scePaf_CDDCFFB3 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void scePaf_CE17B5DC (int arg1);
extern void scePaf_CFC5F330 ();
extern void scePaf_D095DD26 (int arg1);
extern void scePaf_D0FA27ED (int arg1);
extern int scePaf_D27A723F (int arg1, int arg2);
extern void scePaf_D2C9B526 (int arg1);
extern void scePaf_D34FC43E (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_D4E25D69 (int arg1);
extern void scePaf_D59E54BC (int arg1, int arg2);
extern void scePaf_D628F663 (int arg1);
extern int scePaf_D6E29A9E (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_D7AF5E55 (int arg1, int arg2);
extern void scePaf_D7ECE14E (int arg1);
extern int scePaf_D86C4533 (int arg1, int arg2);
extern void scePaf_D90F5A94 (int arg1);
extern void scePaf_D9D11B9A (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_DE0E0F8B (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_E05C0B73 (int arg1, int arg2);
extern void scePaf_E079C92B (int arg1, int arg2);
extern void scePaf_E0BAFD21 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_E2AFAB23 (int arg1, int arg2, int arg3);
extern void scePaf_E305A594 (int arg1, int arg2);
extern int scePaf_E3D530AE (int arg1, int arg2);
extern void scePaf_E44CA200 (int arg1);
extern int scePaf_E487AEFA (int arg1);
extern void scePaf_E81F861B (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_E9272129 (int arg1);
extern void scePaf_E9DBEA88 (int arg1);
extern void scePaf_EADEB5FC (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern void scePaf_EBF1BC9F (int arg1);
extern int scePaf_ED055C3C (int arg1, int arg2);
extern int scePaf_ED355845 (int arg1, int arg2);
extern void scePaf_ED87D485 (int arg1);
extern void scePaf_EDE28DAC (int arg1, int arg2);
extern void scePaf_EF154C08 (int arg1, int arg2);
extern void scePaf_F1F9D49A (int arg1, int arg2);
extern void scePaf_F3146F7A (int arg1);
extern void scePaf_F3D3570C (int arg1);
extern void scePaf_F52058EA (int arg1, int arg2, int arg3);
extern void scePaf_F6BB8C46 (int arg1, int arg2, int arg3);
extern void scePaf_F787B3B0 (int arg1, int arg2);
extern void scePaf_F88B0631 (int arg1, int arg2);
extern void scePaf_F9443064 (int arg1, int arg2, int arg3);
extern void scePaf_FC08C1EC (int arg1);
extern void scePaf_FC63C8CA (int arg1);
extern int scePaf_FCCB5B3C (int arg1, int arg2);
extern void scePaf_FFA6B745 (int arg1, int arg2);
extern int scePaf_FFD71622 (int arg1);

/*
 * Imports from library: sceMpeg
 */
extern void sceMpeg_682A619B ();
extern void sceMpeg_874624D6 ();

/*
 * Imports from library: sceAtrac3plus
 */
extern void sceAtrac3plus_132F1ECA (int arg1, int arg2);

/*
 * Imports from library: sceCtrl
 */
extern void sceCtrl_3A622550 (int arg1, int arg2);

/*
 * Imports from library: scePower
 */
extern int scePower_04B7766E (int arg1, int arg2);
extern int scePower_0AFD0D8B ();
extern int scePower_1E490401 ();
extern int scePower_2085D15D ();
extern int scePower_AC32C9CC ();
extern void scePower_DFA8BAF8 (int arg1);
extern int scePower_EBD177D6 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceVaudio
 */
extern void sceVaudio_CBD4AC51 (int arg1);

/*
 * Imports from library: sceUmdUser
 */
extern int sceUmdUser_46EBB729 ();
extern int sceUmdUser_87533940 ();
extern int sceUmdUser_AEE7404D (int arg1);
extern void sceUmdUser_BD2BDE07 (int arg1);
extern int sceUmdUser_C6183D47 (int arg1, int arg2);

/*
 * Imports from library: IoFileMgrForUser
 */
extern int IoFileMgrForUser_06A70004 (int arg1, int arg2);
extern int IoFileMgrForUser_109F50BC (int arg1, int arg2, int arg3);
extern int IoFileMgrForUser_27EB27B8 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int IoFileMgrForUser_42EC03AC (int arg1, int arg2, int arg3);
extern int IoFileMgrForUser_54F5FB11 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int IoFileMgrForUser_6A638D83 (int arg1, int arg2, int arg3);
extern void IoFileMgrForUser_6D08A871 (int arg1);
extern int IoFileMgrForUser_779103A0 (int arg1, int arg2);
extern void IoFileMgrForUser_810C4BC3 (int arg1);
extern int IoFileMgrForUser_ACE946E8 (int arg1, int arg2);
extern void IoFileMgrForUser_B2A628C1 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int IoFileMgrForUser_F27A9C51 (int arg1);

/*
 * Imports from library: Kernel_Library
 */
extern int Kernel_Library_092968F4 ();
extern void Kernel_Library_15B6446B (int arg1, int arg2);
extern void Kernel_Library_5F10D406 (int arg1);
extern void Kernel_Library_BEA46419 (int arg1, int arg2, int arg3);

/*
 * Imports from library: ModuleMgrForUser
 */
extern int ModuleMgrForUser_2E0911AA (int arg1);
extern int ModuleMgrForUser_50F0C1EC (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int ModuleMgrForUser_D1FF982A (int arg1, int arg2, int arg3, int arg4, int arg5);

/*
 * Imports from library: sceSuspendForUser
 */
extern void sceSuspendForUser_3E0271D3 (int arg1, int arg2, int arg3);
extern void sceSuspendForUser_A569E425 (int arg1);

/*
 * Imports from library: ThreadManForUser
 */
extern int ThreadManForUser_C07BB470 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void ThreadManForUser_CEADEB47 (int arg1);
extern int ThreadManForUser_D6DA4BA1 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int ThreadManForUser_E81CAF8F (int arg1, int arg2, int arg3);
extern void ThreadManForUser_ED1410E0 (int arg1);
extern void ThreadManForUser_EDBA5844 (int arg1);
extern void ThreadManForUser_EF9E4C70 (int arg1);
extern int ThreadManForUser_F475845D (int arg1, int arg2, int arg3);
extern void ThreadManForUser_1FB15A32 (int arg1, int arg2);
extern void ThreadManForUser_F6414A71 (int arg1);
extern int ThreadManForUser_28B6489C (int arg1);
extern void ThreadManForUser_349D6D6C ();
extern int ThreadManForUser_369ED59D ();
extern int ThreadManForUser_3F53E640 (int arg1, int arg2);
extern void ThreadManForUser_402FCF22 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int ThreadManForUser_446D8DE6 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int ThreadManForUser_4E3A1105 (int arg1, int arg2, int arg3);
extern int ThreadManForUser_55C20A00 (int arg1, int arg2, int arg3, int arg4);
extern void ThreadManForUser_60107536 (int arg1);
extern void ThreadManForUser_623AE665 (int arg1, int arg2);
extern void ThreadManForUser_812346E4 (int arg1, int arg2);
extern void ThreadManForUser_9FA03CD3 (int arg1);
extern void ThreadManForUser_A66B0120 (int arg1, int arg2);
extern void ThreadManForUser_19CFF145 (int arg1, int arg2, int arg3, int arg4, int arg5);

/*
 * Imports from library: UtilsForUser
 */
extern void UtilsForUser_79D1C3FA ();

/**
 * Subroutine at address 0x00000000
 */
void sub_00000 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  sub_000AC ();
  sub_009D4 ();
  ra = ((int *) sp)[5];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00000024
 */
void sub_00024 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((unsigned char *) 0x000470A0);
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  if (!(var1 != 0x00000000))
  {
    var2 = *((int *) 0x000454E4);
    var3 = ((int *) var2)[0];
    if (!(var3 == 0x00000000))
    {
      var4 = *((int *) 0x000454E4);
      var5 = var4 + 0x00000004;
      while (1) {
        *((int *) 0x000454E4) = var5;
        var8 var9 = (*var3) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        var10 = *((int *) 0x000454E4);
        var3 = ((int *) var10)[0];
        var5 = var10 + 0x00000004;
        if (var3 != 0x00000000)
          continue;
        break;
      }
    }
    if (0x00000000 == 0x00000000)
    {
    }
    else
    {
      sub_00000 ();
    }
    *((char *) 0x000470A0) = 0x00000001;
  }
  ra = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000000AC
 */
void sub_000AC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (!(0x00000000 == 0x00000000))
  {
    sub_00000 ();
  }
  var3 = *((int *) 0x00036788);
  if (var3 == 0x00000000)
  {

  label9:
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
    if (!(0x00000000 == 0x00000000))
    {
      sub_00000 ();
      goto label9;
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000010C
 */
int vsh_6D850670 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[28] = s4;
  var1 = 0xFFFFFE6F;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  var2 = arg3;
  ((int *) sp)[25] = s1;
  var3 = arg2;
  ((int *) sp)[29] = ra;
  ((int *) sp)[24] = s0;
  if (!(arg2 == 0x00000000))
  {
    var4 = 0xFFFFFE6F;
    if (arg1 == 0x00000000)
    {

    label23:

    label24:
      scePaf_6439FDBC (var3, 0x00000000, var2);
      var1 = var4;
    }
    else
    {
      var5 = sp;
      var8 = IoFileMgrForUser_ACE946E8 (arg1, var5);
      var4 = var8;
      if (var8 != 0x00000000)
        goto label23;
      var9 = ((int *) sp)[2];
      if (var9 == var2)
      {
        var17 = ((int *) sp)[3];
        if (var17 != 0x00000000)
        {
          var4 = 0xFFFFFE70;
          goto label23;
        }
        else
        {
          var20 = IoFileMgrForUser_109F50BC (arg1, 0x00000001, 0x000001FF);
          var4 = var20;
          if (var20 < 0)
            goto label23;
          var23 = IoFileMgrForUser_6A638D83 (var20, var3, var2);
          var4 = var23;
          if (var23 < 0)
            goto label23;
          IoFileMgrForUser_810C4BC3 (var20);
          var28 = sceResmgr_9DC14891 (var3, var2, arg4);
          var4 = var28;
          var1 = 0x00000000;
          if (!(var4 >= 0))
          {
            goto label24;
          }
        }
      }
      else
      {
        var4 = 0xFFFFFE70;
        goto label23;
      }
    }
  }
  ra = ((int *) sp)[29];
  var12 = ((int *) sp)[28];
  var13 = ((int *) sp)[27];
  var14 = ((int *) sp)[26];
  var15 = ((int *) sp)[25];
  var16 = ((int *) sp)[24];
  sp = sp + 0x00000080;
  return var1;
}

/**
 * Subroutine at address 0x00000208
 */
void vsh_81B8AFCC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = sp;
  ((int *) sp)[9] = ra;
  sub_00254 (0x0003B430, 0x00000010, arg1, arg3, var1);
  var4 = sp;
  var7 = scePaf_B6ADE52D (arg2, var4, 0x00000010);
  ra = ((int *) sp)[9];
  var8 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00000254
 */
void sub_00254 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[48] = s0;
  var1 = sp + 0x00000080;
  ((int *) sp)[52] = s4;
  ((int *) sp)[50] = s2;
  var2 = arg1;
  ((int *) sp)[49] = s1;
  var3 = arg2;
  ((int *) sp)[53] = s5;
  ((int *) sp)[51] = s3;
  ((int *) sp)[54] = ra;
  scePaf_6439FDBC (var1, 0x00000000, 0x00000040);
  if (((var3 < 0x00000041)) == 0x00000000)
  {
    scePaf_39374DDC (var2, var3, var1);
    var8 = 0x00000000;
  }
  else
  {
    scePaf_3447707B (var1, var2, var3);
    var8 = 0x00000000;
  }
  while (1) {
    var9 = var1 + var8;
    var10 = ((unsigned char *) var9)[0];
    var8 = var8 + 0x00000001;
    ((char *) var9)[0] = (var10 ^ 0x00000036);
    if (((var8 < 0x00000040)) != 0x00000000)
      continue;
    break;
  }
  var11 = sp;
  scePaf_FC08C1EC (var11);
  var14 = sp;
  scePaf_F9443064 (var14, var1, 0x00000040);
  var17 = sp + 0x00000060;
  var18 = sp;
  scePaf_F9443064 (var18, arg3, arg4);
  var21 = sp;
  scePaf_A7EB06ED (var21, var17);
  var24 = 0x00000000;
  while (1) {
    var25 = var1 + var24;
    var26 = ((unsigned char *) var25)[0];
    var24 = var24 + 0x00000001;
    ((char *) var25)[0] = (var26 ^ 0x0000006A);
    if (((var24 < 0x00000040)) != 0x00000000)
      continue;
    break;
  }
  var27 = sp;
  scePaf_FC08C1EC (var27);
  var30 = sp;
  scePaf_F9443064 (var30, var1, 0x00000040);
  var33 = sp;
  scePaf_F9443064 (var33, var17, 0x00000014);
  var36 = sp;
  scePaf_A7EB06ED (var36, arg5);
  ra = ((int *) sp)[54];
  var39 = ((int *) sp)[53];
  var40 = ((int *) sp)[52];
  var41 = ((int *) sp)[51];
  var42 = ((int *) sp)[50];
  var43 = ((int *) sp)[49];
  var44 = ((int *) sp)[48];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x0000039C
 */
void vsh_9140242E (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  var1 = *((int *) 0x00045590);
  var2 = *((int *) 0x00045594);
  ((int *) sp)[5] = s1;
  ((int *) sp)[10] = s6;
  ((int *) sp)[8] = s4;
  var3 = arg2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[11] = ra;
  ((int *) sp)[9] = s5;
  ((int *) sp)[7] = s3;
  ((int *) sp)[6] = s2;
  var6 = sub_317B8 (0x000470C0, arg2, var1, var2);
  if (!(var6 < 0))
  {
    var7 = 0x00000000;
    while (1) {
      var8 = ((unsigned char *) (0x0003B440 + var7))[0];
      var7 = var7 + 0x00000001;
      ((char *) (var7 + 0x000470C0))[128] = var8;
      if (((var7 < 0x00000008)) != 0x00000000)
        continue;
      break;
    }
  }
  var9 = 0x00000000;
  if (!(var3 == 0x00000000))
  {
    var10 = arg1;
    while (1) {
      var11 = 0x00000000;
      var12 = sp + 0x00000007;
      while (1) {
        var13 = ((unsigned char *) (var10 + var11))[0];
        var11 = var11 + 0x00000001;
        ((char *) var12)[0] = var13;
        var12 = var12 + 0xFFFFFFFF;
        if (((var11 < 0x00000008)) != 0x00000000)
          continue;
        break;
      }
      var14 = ((int *) sp)[0];
      var15 = ((int *) sp)[1];
      var18 var19 = sub_316AC (0x000470C0, var7, var14, var15);
      ((int *) sp)[0] = var18;
      ((int *) sp)[1] = var19;
      var20 = 0x00000000;
      var21 = sp + 0x00000007;
      while (1) {
        var22 = var20 + 0x000470C0;
        var23 = ((unsigned char *) var21)[0];
        var24 = ((unsigned char *) var22)[128];
        var25 = ((unsigned char *) (var10 + var20))[0];
        var20 = var20 + 0x00000001;
        ((char *) (0x00047150 + var20))[0] = (var24 ^ var23);
        var21 = var21 + 0xFFFFFFFF;
        ((char *) var22)[128] = var25;
        if (((var20 < 0x00000008)) != 0x00000000)
          continue;
        break;
      }
      var26 = *((int *) 0x00047150);
      var9 = var9 + 0x00000001;
      ((int *) var10)[0] = var26;
      var27 = *((int *) 0x00047154);
      ((int *) var10)[1] = var27;
      var10 = var10 + 0x00000008;
      if (((var9 < var3)) != 0x00000000)
        continue;
      break;
    }
  }
  ra = ((int *) sp)[11];
  var28 = ((int *) sp)[10];
  var29 = ((int *) sp)[9];
  var30 = ((int *) sp)[8];
  var31 = ((int *) sp)[7];
  var32 = ((int *) sp)[6];
  var33 = ((int *) sp)[5];
  var34 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000004F8
 */
void vsh_5C12EC00 (int arg1, int arg2)
{
  var1 = arg1;
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var2 = sp;
  var3 = 0x800001FF;
  if (!((((var1 < 0x00000001)) | ((arg2 < 0x00000008))) != 0x00000000))
  {
    var4 = ((int *) var1)[1];
    var5 = ((int *) var1)[0];
    ((int *) sp)[0] = ((((var4 >> 0x00000018) | ((var4 >> 0x00000008) & 0x0000FF00)) | ((var4 << 0x00000008) & 0x00FF0000)) | (var4 << 0x00000018));
    ((int *) sp)[1] = ((((var5 >> 0x00000018) | ((var5 >> 0x00000008) & 0x0000FF00)) | ((var5 << 0x00000008) & 0x00FF0000)) | (var5 << 0x00000018));
    scePaf_3447707B (0x00045590, var2, 0x00000008);
    var8 = *((int *) 0x00045590);
    var9 = *((int *) 0x00045594);
    var3 = 0x00000000;
    *((int *) 0x00045590) = (var8 ^ 0x474A8DC0);
    *((int *) 0x00045594) = (var9 ^ 0xF932FF26);
  }
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000005DC
 */
void vsh_D0BFB2CA ()
{
  *((int *) 0x00045590) = 0x9C61B930;
  *((int *) 0x00045594) = 0xDA3923EF;
  return;
}

/**
 * Subroutine at address 0x00000608
 */
int sub_00608 (int arg1, int arg2)
{
  var1 = ((arg2 >> 0x00000004) ^ arg1) & 0x0F0F0F0F;
  var2 = arg2 ^ (var1 << 0x00000004);
  var3 = arg1 ^ var1;
  var4 = ((var2 >> 0x00000010) ^ var3) & 0x0000FFFF;
  var5 = var3 ^ var4;
  var6 = var2 ^ (var4 << 0x00000010);
  var7 = ((var5 >> 0x00000002) ^ var6) & 0x33333333;
  var8 = var5 ^ (var7 << 0x00000002);
  var9 = var6 ^ var7;
  var10 = ((var8 >> 0x00000008) ^ var9) & 0x00FF00FF;
  var11 = var9 ^ var10;
  var12 = var8 ^ (var10 << 0x00000008);
  var13 = ((var11 >> 0x00000001) ^ var12) & 0x55555555;
  return (var12 ^ var13) (var11 ^ (var13 << 0x00000001));
}

/**
 * Subroutine at address 0x000006A8
 */
int sub_006A8 (int arg1, int arg2)
{
  var1 = ((arg2 >> 0x00000001) ^ arg1) & 0x55555555;
  var2 = arg1 ^ var1;
  var3 = arg2 ^ (var1 << 0x00000001);
  var4 = ((var2 >> 0x00000008) ^ var3) & 0x00FF00FF;
  var5 = var2 ^ (var4 << 0x00000008);
  var6 = var3 ^ var4;
  var7 = ((var5 >> 0x00000002) ^ var6) & 0x33333333;
  var8 = var6 ^ var7;
  var9 = var5 ^ (var7 << 0x00000002);
  var10 = ((var8 >> 0x00000010) ^ var9) & 0x0000FFFF;
  var11 = var8 ^ (var10 << 0x00000010);
  var12 = var9 ^ var10;
  var13 = ((var11 >> 0x00000004) ^ var12) & 0x0F0F0F0F;
  return (var12 ^ var13) (var11 ^ (var13 << 0x00000004));
}

/**
 * Subroutine at address 0x00000748
 */
int sub_00748 (int arg1, int arg2)
{
  var1 = arg2 >> 0x0000000B;
  var2 = arg2 >> 0x00000013;
  var3 = arg2 >> 0x00000003;
  return (((((((arg2 << 0x00000011) & 0x00FFFFFF) | (var3 & 0x000000FF)) & 0xF03FFFFF) | (var3 & 0x0000003F)) & 0xFFFEFFFF) | ((arg2 >> 0x0000001F) & 0x00000001)) (((((((((((((arg2 >> 0x00000007) & 0x8003FFFF) | (var2 & 0x00001FFF)) & 0xFC00FFFF) | (var2 & 0x000003FF)) & 0xFFF03FFF) | (var2 & 0x0000003F)) & 0x7FFFFFFF) | (arg2 & 0x00000001)) & 0xFFFFFF03) | (var1 & 0x0000003F)) & 0xFFFFFFFC) | (var1 & 0x00000003));
}

/**
 * Subroutine at address 0x00000788
 */
int sub_00788 (int arg1, int arg2)
{
  return 0x00000000 (((((((((((((((((((((((((((((((((((((((((((((((((((((ROTV (0x0000001B, arg2)) & 0xCFFFFFFF) | ((arg2 >> 0x0000000B) & 0x00000003)) & 0xFFFCFFFF) | (arg2 & 0x00000003)) & 0xFFFFFF7F) | ((arg2 >> 0x0000000D) & 0x00000001)) & 0xFFFFEFFF) | ((arg2 >> 0x00000012) & 0x00000001)) & 0xFFFFF7FF) | (arg2 & 0x00000001)) & 0xFFFEFFFF) | ((arg2 >> 0x00000016) & 0x00000001)) & 0xFFFFFFDF) | ((arg2 >> 0x00000002) & 0x00000001)) & 0xF7FFFFFF) | ((arg2 >> 0x00000003) & 0x00000001)) & 0xFDFFFFFF) | ((arg2 >> 0x00000004) & 0x00000001)) & 0xFFEFFFFF) | ((arg2 >> 0x00000006) & 0x00000001)) & 0xFFFFFFFE) | ((arg2 >> 0x00000007) & 0x00000001)) & 0xFFDFFFFF) | ((arg2 >> 0x00000009) & 0x00000001)) & 0xFFFFFFF7) | ((arg2 >> 0x0000000A) & 0x00000001)) & 0xFFFBFFFF) | ((arg2 >> 0x0000000E) & 0x00000001)) & 0xFEFFFFFF) | ((arg2 >> 0x0000000F) & 0x00000001)) & 0x7FFFFFFF) | ((arg2 >> 0x00000010) & 0x00000001)) & 0xFFFFFFBF) | ((arg2 >> 0x00000013) & 0x00000001)) & 0xFBFFFFFF) | ((arg2 >> 0x00000014) & 0x00000001)) & 0xFFFFFFFB) | ((arg2 >> 0x00000015) & 0x00000001)) & 0xFFFFBFFF) | ((arg2 >> 0x00000018) & 0x00000001)) & 0xFFFFFFEF) | ((arg2 >> 0x0000001A) & 0x00000001)) & 0xFFF7FFFF) | ((arg2 >> 0x0000001B) & 0x00000001)) & 0xFFFFFDFF) | ((arg2 >> 0x0000001D) & 0x00000001)) & 0xFF7FFFFF) | ((arg2 >> 0x0000001F) & 0x00000001)) & 0xFFFFFEFF) | ((arg2 >> 0x00000017) & 0x00000001)) & 0xFFFF7FFF) | ((arg2 >> 0x0000001E) & 0x00000001));
}

/**
 * Subroutine at address 0x0000085C
 */
int sub_0085C (int arg1, int arg2)
{
  var1 = 0x00040000;
  while (1) {
    var2 = (var1 & 0xFFFFFFC0) | (arg1 & 0x0000003F);
    var3 = ((unsigned char *) var2)[-19328];
    var4 = arg1 >> 0x00000006;
    var5 = (var2 & 0xFFFFFFC0) | (var4 & 0x0000003F);
    var6 = ((unsigned char *) var5)[-19328];
    var7 = var4 >> 0x00000006;
    var8 = ((var5 + 0x00000040) & 0xFFFFFFC0) | (var7 & 0x0000003F);
    var9 = ((unsigned char *) var8)[-19328];
    var10 = var7 >> 0x00000006;
    var11 = (var8 & 0xFFFFFFC0) | (var10 & 0x0000003F);
    var12 = ((unsigned char *) var11)[-19328];
    arg1 = ((var10 >> 0x00000006) & 0x000000FF) | (arg2 & 0x00FFFFFF);
    var1 = var11 + 0x00000040;
    var13 = var1 & 0x00000080;
    v1 = ((v1 >> 0x00000010) & 0x0000FFFF) | (((((var6 & 0xFFFFFFF0) | (var3 & 0x0000000F)) & 0xFFFF00FF) | (((var12 & 0xFFFFFFF0) | (var9 & 0x0000000F)) & 0x000000FF)) & 0x0000FFFF);
    if (var13 != 0x00000000)
      continue;
    break;
  }
  return var13 v1;
}

/**
 * Subroutine at address 0x000008C0
 */
void sub_008C0 (int arg1, int arg2, int arg3, int arg4)
{
  var1 = 0x0003B580;
  var2 = 0x00000000;
  var3 = 0x80000000;
  var4 = 0x00000000;
  var5 = 0x00000000;
  while (1) {
    var6 = ((unsigned char *) var1)[0];
    var1 = var1 + 0x00000001;
    var7 = (!((var6 & 0x00000020)) ? (arg3 >> var6) : (arg4 >> var6)) & 0x00000001;
    var4 = (var7) ? (var4 | var2) : var4;
    var5 = (var7) ? (var5 | var3) : var5;
    var2 = ((var2 >> 0x00000001) & 0x7FFFFFFF) | (var3 & 0x00000001);
    var3 = var3 >> 0x00000001;
    if (0x0003B5B8 != var1)
      continue;
    break;
  }
  var8 = var5 >> 0x00000004;
  var9 = (((var4 >> 8) & 0x00FFFFFF) & 0xF0FFFFFF) | (var5 & 0x0000000F);
  var10 = 0x0000FDF8;
  while (1) {
    var10 = var10 >> 0x00000001;
    var11 = var10 & 0x00000001;
    var12 = var11 ^ 0x0000001F;
    var13 = var11 + 0x00000001;
    var8 = (((var8 << var13) | ((var8 << 0x00000004) >> var12)) >> 0) & 0x0FFFFFFF;
    var9 = (((var9 << var13) | ((var9 << 0x00000004) >> var12)) >> 0) & 0x0FFFFFFF;
    var14 = 0x0003B588;
    var15 = 0x00000000;
    var16 = 0x80000000;
    var17 = 0x00000000;
    var18 = 0x00000000;
    while (1) {
      var19 = ((unsigned char *) var14)[48];
      var14 = var14 + 0x00000001;
      var20 = (!((var19 & 0x00000020)) ? ((var9 << 0x00000008) >> var19) : ((((var9 >> 0x00000018) & 0x0000000F) | (var8 & 0x0FFFFFFF)) >> var19)) & 0x00000001;
      var17 = (var20) ? (var17 | var15) : var17;
      var18 = (var20) ? (var18 | var16) : var18;
      var15 = ((var15 >> 0x00000001) & 0x7FFFFFFF) | (var16 & 0x00000001);
      var16 = var16 >> 0x00000001;
      if (0x0003B5B8 != var14)
        continue;
      break;
    }
    ((int *) arg1)[0] = var17;
    arg1 = arg1 + 0x00000008;
    ((int *) arg1)[1073741823] = var18;
    if (var10 != 0x00000000)
      continue;
    break;
  }
  return;
}

/**
 * Subroutine at address 0x000009D4
 */
void sub_009D4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00036760);
  var2 = 0x00036760;
  if (!(var1 == 0xFFFFFFFF))
  {
    var3 = var1;
    while (1) {
      var2 = var2 + 0xFFFFFFFC;
      var6 var7 = (*var3) (var1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
      var8 = ((int *) var2)[0];
      var3 = var8;
      if (var8 != 0xFFFFFFFF)
        continue;
      break;
    }
  }
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00000A2C
 */
int sub_00A2C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFEE0;
  ((int *) sp)[70] = s2;
  ((int *) sp)[69] = s1;
  ((int *) sp)[68] = s0;
  ((int *) sp)[71] = ra;
  var1 = sp;
  scePaf_6439FDBC (var1, 0x00000000, 0x00000101);
  var4 = sp;
  scePaf_ACB55E4C (var4, arg1, 0x00000101);
  var7 = sp;
  var10 = scePaf_811F0310 (var7, 0x0000002F);
  var11 = 0x80108401;
  if (!(var10 == 0x00000000))
  {
    ((char *) var10)[0] = 0x00000000;
    scePaf_98DE3BA6 (arg3, (var10 + 0x00000001));
    var14 = sp;
    scePaf_98DE3BA6 (arg2, var14);
    var11 = 0x00000000;
  }
  ra = ((int *) sp)[71];
  var17 = ((int *) sp)[70];
  var18 = ((int *) sp)[69];
  var19 = ((int *) sp)[68];
  sp = sp + 0x00000120;
  return var11;
}

/**
 * Subroutine at address 0x00000AC0
 */
int sub_00AC0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg4;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  var4 = scePaf_6CEA048C (arg4);
  var5 = var4;
  var6 = 0x80108403;
  if (!(var5 == 0x00000000))
  {
    scePaf_6439FDBC (var4, arg3, var1);
    var11 = sceReg_17768E14 (arg1, arg2, var5, var1);
    scePaf_22FB4177 (var5);
    var6 = var11;
  }
  ra = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x00000B5C
 */
int sub_00B5C (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[6] = s2;
  var1 = arg3;
  ((int *) sp)[4] = s0;
  var2 = arg2;
  ((int *) sp)[11] = ra;
  var3 = sp;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  var4 = ((int *) ((arg2 << 0x00000002) + 0x00045598))[0];
  var7 = sceReg_1D8A762E (arg1, var4, 0x00000001, var3);
  ra = ((int *) sp)[11];
  if (!(var7 != 0x00000000))
  {
    var8 = (((var2 << 0x00000005) + var2) << 0x00000004) + 0x0003B600;
    var9 = ((int *) var8)[0];
    if (var9 == 0x00000000)
    {

    label46:
      var7 = 0x80108401;
    }
    else
    {
      var10 = var8;
      var11 = ((int *) var10)[0];
      while (1) {
        var14 = scePaf_E3D530AE (var11, var1);
        if (var14 == 0x00000000)
        {
          var24 = ((int *) var10)[3];
          var25 = ((int *) var10)[1];
          var26 = sp + 0x00000004;
          var27 = ((int *) var10)[2];
          ((int *) sp)[1] = var24;
          sub_00F78 (var4, var1, arg4, arg5, var26);
          var30 = ((int *) sp)[0];
          var33 = sceReg_57641A81 (var30, var1, (var25 & 0x0000FFFF), var27);
          var34 = var33;
          if ((((0x00000000 < var33)) & ((0x00000000 < (var33 ^ 0x80082728)))) != 0x00000000)
          {

          label36:
            var42 = ((int *) sp)[0];
            sceReg_0CAE832B (var42);
            var7 = var34;
          }
          else
          {
            if (var25 == 0x00000003)
            {
              var56 = ((int *) sp)[1];
              var59 = scePaf_967A56EF (var56);
              var60 = ((int *) sp)[0];
              var61 = ((int *) sp)[1];

            label32:
              var48 = sceReg_17768E14 (var35, var1, var45, var27);
              var34 = var48;
            }
            else
            {
              if (((var25 < 0x00000004)) == 0x00000000)
              {
                if (var25 == 0x00000004)
                {
                  var54 = ((int *) sp)[0];
                  var55 = ((int *) sp)[1];
                  goto label32;
                }
                else
                {
                  var49 = ((int *) sp)[0];
                  if (!(var25 != 0x00010004))
                  {
                    var50 = ((int *) sp)[1];
                    var53 = sub_00AC0 (var49, var1, var50, var27);
                    var34 = var53;
                  }
                }
              }
              else
              {
                var35 = ((int *) sp)[0];
                if (var25 == 0x00000002)
                {
                  var45 = sp + 0x00000004;
                  goto label32;
                }
              }
            }
            if (var34 != 0x00000000)
              goto label36;
            var36 = ((int *) sp)[0];
            sceReg_0D69BF40 (var36);
            var39 = ((int *) sp)[0];
            sceReg_0CAE832B (var39);
            var7 = 0x00000000;
          }
        }
        else
        {
          var10 = var10 + 0x00000010;
          var15 = ((int *) var10)[0];
          if (!(var15 != 0x00000000))
            break;
          var23 = ((int *) var10)[0];
          continue;
        }
        goto label47;
      }
      goto label46;
    }

  label47:
    ra = ((int *) sp)[11];
  }
  var16 = ((int *) sp)[10];
  var17 = ((int *) sp)[9];
  var18 = ((int *) sp)[8];
  var19 = ((int *) sp)[7];
  var20 = ((int *) sp)[6];
  var21 = ((int *) sp)[5];
  var22 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var7;
}

/**
 * Subroutine at address 0x00000D5C
 */
int sub_00D5C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[9] = s1;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = fp;
  var1 = arg2;
  ((int *) sp)[15] = s7;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  ((int *) sp)[8] = s0;
  var2 = ((int *) ((arg2 << 0x00000002) + 0x00045598))[0];
  ((int *) sp)[2] = arg3;
  ((int *) sp)[3] = arg4;
  var3 = sp;
  var6 = sceReg_1D8A762E (arg1, var2, 0x00000001, var3);
  ra = ((int *) sp)[17];
  if (!(var6 != 0x00000000))
  {
    var7 = (var1 << 0x00000005) + var1;
    var8 = (var7 << 0x00000004) + 0x0003B600;
    var9 = ((int *) var8)[0];
    var10 = 0x00000000;
    if (var9 == 0x00000000)
    {

    label38:
      var30 = ((int *) sp)[0];
      sceReg_0D69BF40 (var30);
      var33 = ((int *) sp)[0];
      sceReg_0CAE832B (var33);
      var6 = 0x00000000;
    }
    else
    {
      var11 = var7;
      ((int *) sp)[4] = 0x00010004;
      var12 = var8;
      while (1) {
        var13 = ((var11 + var10) << 0x00000004) + 0x0003B600;
        var14 = ((int *) var13)[0];
        var15 = ((int *) var13)[3];
        var16 = ((int *) sp)[2];
        var17 = ((int *) sp)[3];
        var18 = ((int *) var13)[1];
        var19 = ((int *) var13)[2];
        var20 = sp + 0x00000004;
        ((int *) sp)[1] = var15;
        sub_00F78 (var2, var14, var16, var17, var20);
        var23 = ((int *) sp)[0];
        var26 = sceReg_57641A81 (var23, var14, (var18 & 0x0000FFFF), var19);
        var27 = var26;
        if ((((0x00000000 < var26)) & ((0x00000000 < (var26 ^ 0x80082728)))) != 0x00000000)
          break;
        if (var18 == 0x00000003)
        {
          var62 = ((int *) sp)[1];
          var65 = scePaf_967A56EF (var62);
          var66 = ((int *) sp)[0];
          var67 = ((int *) sp)[1];

        label29:
          var52 = sceReg_17768E14 (var48, var14, var49, var19);
          var27 = var52;
        }
        else
        {
          if (((var18 < 0x00000004)) == 0x00000000)
          {
            var53 = ((int *) sp)[0];
            if (var18 == 0x00000004)
            {
              var61 = ((int *) sp)[1];
              goto label29;
            }
            else
            {
              var54 = ((int *) sp)[4];
              if (var18 != var54)
              {
                var60 = ((int *) sp)[0];
              }
              else
              {
                var55 = ((int *) sp)[0];
                var56 = ((int *) sp)[1];
                var59 = sub_00AC0 (var55, var14, var56, var19);
                var27 = var59;
              }
            }
          }
          else
          {
            if (var18 == 0x00000002)
            {
              var48 = ((int *) sp)[0];
              var49 = sp + 0x00000004;
              goto label29;
            }
            else
            {
              var28 = ((int *) sp)[0];
            }
          }
        }
        var12 = var12 + 0x00000010;
        if (var27 != 0x00000000)
          break;
        var29 = ((int *) var12)[0];
        var10 = var10 + 0x00000001;
        var11 = var11;
        if (var29 != 0x00000000)
          continue;
        goto label38;
      }
      var45 = ((int *) sp)[0];
      sceReg_0CAE832B (var45);
      var6 = var27;
    }
    ra = ((int *) sp)[17];
  }
  var36 = ((int *) sp)[16];
  var37 = ((int *) sp)[15];
  var38 = ((int *) sp)[14];
  var39 = ((int *) sp)[13];
  var40 = ((int *) sp)[12];
  var41 = ((int *) sp)[11];
  var42 = ((int *) sp)[10];
  var43 = ((int *) sp)[9];
  var44 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return var6;
}

/**
 * Subroutine at address 0x00000F78
 */
void sub_00F78 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[4] = s4;
  var2 = arg4;
  ((int *) sp)[3] = s3;
  var3 = arg5;
  ((int *) sp)[2] = s2;
  var4 = arg3;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  var5 = arg1;
  var8 = scePaf_E3D530AE (arg1, "/CONFIG/VIDEO");
  if (var8 != 0x00000000)
  {
    var24 = scePaf_E3D530AE (var5, "/CONFIG/SYSTEM/XMB");
    if (var24 != 0x00000000)
    {
      var35 = scePaf_E3D530AE (var5, "/CONFIG/SYSTEM/CHARACTER_SET");
      if (var35 != 0x00000000)
      {
        var46 = scePaf_E3D530AE (var5, "/CONFIG/DATE");
        if (var46 != 0x00000000)
        {
          var65 = scePaf_E3D530AE (var5, "/CONFIG/NETWORK/INFRASTRUCTURE");
          if (var65 != 0x00000000)
          {
            var80 = scePaf_E3D530AE (var5, "/CONFIG/NP");
            if (var80 != 0x00000000)
            {
              var87 = scePaf_E3D530AE (var5, "/CONFIG/BROWSER");
              ra = ((int *) sp)[5];
              if (var87 != 0x00000000)
              {

              label226:
                var14 = ((int *) sp)[4];
              }
              else
              {
                var90 = scePaf_E3D530AE (var1, "flash_activated");
                if (var90 != 0x00000000)
                {
                  var93 = scePaf_E3D530AE (var1, "flash_play");
                  ra = ((int *) sp)[5];
                  if (var93 != 0x00000000)
                    goto label226;
                  if (var2 == 0x00000000)
                  {
                    var14 = ((int *) sp)[4];
                  }
                  else
                  {
                    var14 = ((int *) sp)[4];
                    ((int *) var3)[0] = 0x00000001;
                  }
                }
                else
                {
                  ra = ((int *) sp)[5];
                  if (!(var2 == 0x00000000))
                  {
                    ((int *) var3)[0] = 0x00000001;
                  }
                  goto label226;
                }
              }
            }
            else
            {
              var83 = scePaf_E3D530AE (var1, 0x000373B8);
              ra = ((int *) sp)[5];
              if (var83 != 0x00000000)
                goto label226;
              if (((var4 < 0x0000000F)) == 0x00000000)
              {
                var14 = ((int *) sp)[4];
              }
              else
              {
                var84 = ((int *) ((var4 << 0x00000002) + 0x00041DE0))[0];
                switch () {
                case 0:
                case 1:
                case 2:
                case 14:
                  ((int *) var3)[0] = "sp-int";

                label225:
                  ra = ((int *) sp)[5];
                  goto label226;
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                  ((int *) var3)[0] = 0x000373BC;
                  goto label225;
                }
              }
            }
          }
          else
          {
            var68 = scePaf_E3D530AE (var1, "eap_md5");
            if (var68 != 0x00000000)
            {
              var72 = scePaf_E3D530AE (var1, "auto_setting");
              if (var72 != 0x00000000)
              {
                var76 = scePaf_E3D530AE (var1, "wifisvc_setting");
                ra = ((int *) sp)[5];
                if (var76 != 0x00000000)
                  goto label226;
                var14 = ((int *) sp)[4];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var77 = ((int *) ((var4 << 0x00000002) + 0x00041DA4))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 14:
                    ((int *) var3)[0] = 0x00000004;
                    goto label225;
                  case 3:
                    ((int *) var3)[0] = 0x00000002;
                    goto label225;
                  case 4:
                    ((int *) var3)[0] = 0x00000001;
                    goto label225;
                  case 5:
                  case 6:
                  case 8:
                  case 9:
                  case 10:
                  case 11:
                  case 12:
                  case 13:
                    ((int *) var3)[0] = 0x00000000;
                    goto label225;
                  case 7:
                    ((int *) var3)[0] = 0x00000003;
                    goto label225;
                  }
                }
              }
              else
              {
                ra = ((int *) sp)[5];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var73 = ((int *) ((var4 << 0x00000002) + 0x00041D68))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 3:
                  case 14:
                    ((int *) var3)[0] = 0x00000001;
                    goto label225;
                  case 4:
                  case 5:
                  case 6:
                  case 7:
                  case 9:
                  case 10:
                  case 11:
                  case 13:
                    ((int *) var3)[0] = 0x00000002;
                    goto label225;
                  case 8:
                  case 12:
                    ((int *) var3)[0] = 0x00000000;
                    goto label225;
                  }
                }
                goto label226;
              }
            }
            else
            {
              ra = ((int *) sp)[5];
              if (!(((var4 < 0x0000000F)) == 0x00000000))
              {
                var69 = ((int *) ((var4 << 0x00000002) + 0x00041D2C))[0];
                switch () {
                case 0:
                case 1:
                case 2:
                case 6:
                case 14:
                  ((int *) var3)[0] = 0x00000001;
                  goto label225;
                case 3:
                case 4:
                case 5:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                  ((int *) var3)[0] = 0x00000000;
                  goto label225;
                }
              }
              goto label226;
            }
          }
        }
        else
        {
          var49 = scePaf_E3D530AE (var1, "time_format");
          if (var49 != 0x00000000)
          {
            var53 = scePaf_E3D530AE (var1, "date_format");
            if (var53 != 0x00000000)
            {
              var57 = scePaf_E3D530AE (var1, "time_zone_offset");
              if (var57 != 0x00000000)
              {
                var61 = scePaf_E3D530AE (var1, "time_zone_area");
                ra = ((int *) sp)[5];
                if (var61 != 0x00000000)
                  goto label226;
                var14 = ((int *) sp)[4];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var62 = ((int *) ((var4 << 0x00000002) + 0x00041CF0))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 14:
                    ((int *) var3)[0] = "united_kingdom";
                    goto label225;
                  case 3:
                    ((int *) var3)[0] = "japan";
                    goto label225;
                  case 4:
                    ((int *) var3)[0] = "eastern_us_canada";
                    goto label225;
                  case 5:
                    ((int *) var3)[0] = "belgium";
                    goto label225;
                  case 6:
                    ((int *) var3)[0] = "korea";
                    goto label225;
                  case 7:
                    ((int *) var3)[0] = "united_kingdom";
                    goto label225;
                  case 8:
                    ((int *) var3)[0] = "mexico_mexico_city";
                    goto label225;
                  case 9:
                    ((int *) var3)[0] = "australia_sydney";
                    goto label225;
                  case 10:
                    ((int *) var3)[0] = "hong_kong";
                    goto label225;
                  case 11:
                    ((int *) var3)[0] = "taiwan_province_of_china";
                    goto label225;
                  case 12:
                    ((int *) var3)[0] = "russian_federation_moscow";
                    goto label225;
                  case 13:
                    ((int *) var3)[0] = "china";
                    goto label225;
                  }
                }
              }
              else
              {
                ra = ((int *) sp)[5];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var58 = ((int *) ((var4 << 0x00000002) + 0x00041CB4))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 14:
                    ((int *) var3)[0] = 0x00000000;
                    goto label225;
                  case 3:
                    ((int *) var3)[0] = 0x0000021C;
                    goto label225;
                  case 4:
                    ((int *) var3)[0] = 0xFFFFFED4;
                    goto label225;
                  case 5:
                    ((int *) var3)[0] = 0x0000003C;
                    goto label225;
                  case 6:
                    ((int *) var3)[0] = 0x0000021C;
                    goto label225;
                  case 7:
                    ((int *) var3)[0] = 0x00000000;
                    goto label225;
                  case 8:
                    ((int *) var3)[0] = 0xFFFFFE98;
                    goto label225;
                  case 9:
                    ((int *) var3)[0] = 0x00000258;
                    goto label225;
                  case 10:
                    ((int *) var3)[0] = 0x000001E0;
                    goto label225;
                  case 11:
                    ((int *) var3)[0] = 0x000001E0;
                    goto label225;
                  case 12:
                    ((int *) var3)[0] = 0x000000B4;
                    goto label225;
                  case 13:
                    ((int *) var3)[0] = 0x000001E0;
                    goto label225;
                  }
                }
                goto label226;
              }
            }
            else
            {
              ra = ((int *) sp)[5];
              if (!(((var4 < 0x0000000F)) == 0x00000000))
              {
                var54 = ((int *) ((var4 << 0x00000002) + 0x00041C78))[0];
                switch () {
                case 0:
                case 1:
                case 2:
                case 14:
                  ((int *) var3)[0] = 0x00000002;
                  goto label225;
                case 3:
                  ((int *) var3)[0] = 0x00000000;
                  goto label225;
                case 4:
                  ((int *) var3)[0] = 0x00000001;
                  goto label225;
                case 5:
                  ((int *) var3)[0] = 0x00000002;
                  goto label225;
                case 6:
                  ((int *) var3)[0] = 0x00000000;
                  goto label225;
                case 7:
                  ((int *) var3)[0] = 0x00000002;
                  goto label225;
                case 8:
                  ((int *) var3)[0] = 0x00000002;
                  goto label225;
                case 9:
                  ((int *) var3)[0] = 0x00000002;
                  goto label225;
                case 10:
                  ((int *) var3)[0] = 0x00000000;
                  goto label225;
                case 11:
                  ((int *) var3)[0] = 0x00000000;
                  goto label225;
                case 12:
                  ((int *) var3)[0] = 0x00000002;
                  goto label225;
                case 13:
                  ((int *) var3)[0] = 0x00000000;
                  goto label225;
                }
              }
              goto label226;
            }
          }
          else
          {
            ra = ((int *) sp)[5];
            if (!(((var4 < 0x0000000F)) == 0x00000000))
            {
              var50 = ((int *) ((var4 << 0x00000002) + 0x00041C3C))[0];
              switch () {
              case 0:
              case 1:
              case 2:
              case 14:
                ((int *) var3)[0] = 0x00000000;
                goto label225;
              case 3:
                ((int *) var3)[0] = 0x00000000;
                goto label225;
              case 4:
                ((int *) var3)[0] = 0x00000001;
                goto label225;
              case 5:
                ((int *) var3)[0] = 0x00000000;
                goto label225;
              case 6:
                ((int *) var3)[0] = 0x00000000;
                goto label225;
              case 7:
                ((int *) var3)[0] = 0x00000000;
                goto label225;
              case 8:
                ((int *) var3)[0] = 0x00000001;
                goto label225;
              case 9:
                ((int *) var3)[0] = 0x00000000;
                goto label225;
              case 10:
                ((int *) var3)[0] = 0x00000001;
                goto label225;
              case 11:
                ((int *) var3)[0] = 0x00000001;
                goto label225;
              case 12:
                ((int *) var3)[0] = 0x00000000;
                goto label225;
              case 13:
                ((int *) var3)[0] = 0x00000001;
                goto label225;
              }
            }
            goto label226;
          }
        }
      }
      else
      {
        var38 = scePaf_E3D530AE (var1, 0x00037590);
        if (var38 != 0x00000000)
        {
          var42 = scePaf_E3D530AE (var1, "ansi");
          ra = ((int *) sp)[5];
          if (var42 != 0x00000000)
            goto label226;
          var14 = ((int *) sp)[4];
          if (!(((var4 < 0x0000000F)) == 0x00000000))
          {
            var43 = ((int *) ((var4 << 0x00000002) + 0x00041C00))[0];
            switch () {
            case 0:
            case 1:
            case 2:
            case 14:
              ((int *) var3)[0] = 0x00000013;
              goto label225;
            case 3:
              ((int *) var3)[0] = 0x0000000D;
              goto label225;
            case 4:
            case 5:
            case 7:
            case 8:
            case 9:
            case 10:
              ((int *) var3)[0] = 0x00000013;
              goto label225;
            case 6:
              ((int *) var3)[0] = 0x0000000F;
              goto label225;
            case 11:
              ((int *) var3)[0] = 0x00000010;
              goto label225;
            case 12:
              ((int *) var3)[0] = 0x00000012;
              goto label225;
            case 13:
              ((int *) var3)[0] = 0x0000000E;
              goto label225;
            }
          }
        }
        else
        {
          ra = ((int *) sp)[5];
          if (!(((var4 < 0x0000000F)) == 0x00000000))
          {
            var39 = ((int *) ((var4 << 0x00000002) + 0x00041BC4))[0];
            switch () {
            case 0:
            case 1:
            case 2:
            case 14:
              ((int *) var3)[0] = 0x00000005;
              goto label225;
            case 3:
              ((int *) var3)[0] = 0x0000000D;
              goto label225;
            case 4:
              ((int *) var3)[0] = 0x00000001;
              goto label225;
            case 5:
            case 7:
            case 8:
            case 9:
            case 10:
              ((int *) var3)[0] = 0x00000005;
              goto label225;
            case 6:
              ((int *) var3)[0] = 0x0000000F;
              goto label225;
            case 11:
              ((int *) var3)[0] = 0x00000010;
              goto label225;
            case 12:
              ((int *) var3)[0] = 0x0000000B;
              goto label225;
            case 13:
              ((int *) var3)[0] = 0x0000000E;
              goto label225;
            }
          }
          goto label226;
        }
      }
    }
    else
    {
      var27 = scePaf_E3D530AE (var1, "language");
      if (var27 != 0x00000000)
      {
        var31 = scePaf_E3D530AE (var1, "button_assign");
        ra = ((int *) sp)[5];
        if (var31 != 0x00000000)
          goto label226;
        var14 = ((int *) sp)[4];
        if (!(((var4 < 0x0000000F)) == 0x00000000))
        {
          var32 = ((int *) ((var4 << 0x00000002) + 0x00041B88))[0];
          switch () {
          case 0:
          case 1:
          case 2:
          case 14:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 3:
            ((int *) var3)[0] = 0x00000000;
            goto label225;
          case 4:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 5:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 6:
            ((int *) var3)[0] = 0x00000000;
            goto label225;
          case 7:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 8:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 9:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 10:
            ((int *) var3)[0] = 0x00000000;
            goto label225;
          case 11:
            ((int *) var3)[0] = 0x00000000;
            goto label225;
          case 12:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 13:
            ((int *) var3)[0] = 0x00000000;
            goto label225;
          }
        }
      }
      else
      {
        ra = ((int *) sp)[5];
        if (!(((var4 < 0x0000000F)) == 0x00000000))
        {
          var28 = ((int *) ((var4 << 0x00000002) + 0x00041B4C))[0];
          switch () {
          case 0:
          case 1:
          case 2:
          case 14:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 3:
            ((int *) var3)[0] = 0x00000000;
            goto label225;
          case 4:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 5:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 6:
            ((int *) var3)[0] = 0x00000009;
            goto label225;
          case 7:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 8:
            ((int *) var3)[0] = 0x00000003;
            goto label225;
          case 9:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 10:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 11:
            ((int *) var3)[0] = 0x0000000A;
            goto label225;
          case 12:
            ((int *) var3)[0] = 0x00000001;
            goto label225;
          case 13:
            ((int *) var3)[0] = 0x0000000B;
            goto label225;
          }
        }
        goto label226;
      }
    }
  }
  else
  {
    var11 = scePaf_E3D530AE (var1, "menu_language");
    if (var11 != 0x00000000)
    {
      var21 = scePaf_E3D530AE (var1, "subtitle_language");
      ra = ((int *) sp)[5];
      if (!(var21 != 0x00000000))
      {
        var12 = (var4 < 0x0000000F);

      label211:
        ra = ((int *) sp)[5];
        if (!(var12 == 0x00000000))
        {
          var13 = ((int *) ((var4 << 0x00000002) + 0x00041B10))[0];
          switch () {
          case 0:
          case 1:
          case 2:
          case 14:
            ((int *) var3)[0] = 0x00037888;
            goto label225;
          case 3:
            ((int *) var3)[0] = 0x00036C14;
            goto label225;
          case 4:
            ((int *) var3)[0] = 0x00037888;
            goto label225;
          case 5:
            ((int *) var3)[0] = 0x00037888;
            goto label225;
          case 6:
            ((int *) var3)[0] = 0x0003788C;
            goto label225;
          case 7:
            ((int *) var3)[0] = 0x00037888;
            goto label225;
          case 8:
            ((int *) var3)[0] = 0x00037890;
            goto label225;
          case 9:
            ((int *) var3)[0] = 0x00037888;
            goto label225;
          case 10:
            ((int *) var3)[0] = 0x00037888;
            goto label225;
          case 11:
            ((int *) var3)[0] = 0x00037894;
            goto label225;
          case 12:
            ((int *) var3)[0] = 0x00037888;
            goto label225;
          case 13:
            ((int *) var3)[0] = 0x00037894;
            goto label225;
          }
        }
      }
    }
    else
    {
      var12 = (var4 < 0x0000000F);
      goto label211;
    }
    goto label226;
  }
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00001924
 */
int sub_01924 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  var1 = sp;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  ((int *) sp)[8] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[1] = 0x00000000;
  var4 = sceReg_1D8A762E (arg1, "/SYSPROFILE", 0x00000002, var1);
  var5 = ((int *) sp)[0];
  if (var4 == 0x00000000)
  {
    var12 = sceReg_57641A81 (var5, 0x00037860, 0x00000002, 0x00000004);
    var13 = var12;
    var14 = ((int *) sp)[0];
    if ((((0x00000000 < var12)) & ((0x00000000 < (var12 ^ 0x80082728)))) != 0x00000000)
    {

    label29:
      var37 = ((int *) sp)[0];
      sceReg_0CAE832B (var37);
      var4 = var13;

    label32:
      ra = ((int *) sp)[8];
    }
    else
    {
      var15 = sp + 0x00000004;
      var18 = sceReg_17768E14 (var14, 0x00037860, var15, 0x00000004);
      var13 = var18;
      if (var18 != 0x00000000)
        goto label29;
      var19 = ((int *) sp)[0];
      sceReg_0D69BF40 (var19);
      var22 = ((int *) sp)[0];
      sceReg_0CAE832B (var22);
      var25 = sp;
      ((int *) sp)[2] = 0x00000000;
      var4 = sceReg_1D8A762E (arg1, "/CONFIG/SYSTEM/XMB", 0x00000002, var25);
      ra = ((int *) sp)[8];
      if (!(var4 != 0x00000000))
      {
        var28 = ((int *) sp)[0];
        var31 = sceReg_57641A81 (var28, 0x00037278, 0x00000002, 0x00000004);
        var13 = var31;
        var32 = ((int *) sp)[0];
        if ((((0x00000000 < var31)) & ((0x00000000 < (var31 ^ 0x80082728)))) != 0x00000000)
          goto label29;
        var33 = sp + 0x00000008;
        var36 = sceReg_17768E14 (var32, 0x00037278, var33, 0x00000004);
        var13 = var36;
        if (!(var36 == 0x00000000))
          goto label29;
        var40 = ((int *) sp)[0];
        sceReg_0D69BF40 (var40);
        var43 = ((int *) sp)[0];
        sceReg_0CAE832B (var43);
        var4 = 0x00000000;
        goto label32;
      }
    }
  }
  else
  goto label32;
  var6 = ((int *) sp)[7];
  var7 = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var4;
}

/**
 * Subroutine at address 0x00001A7C
 */
int sub_01A7C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00D5C (arg1, 0x00000005, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00D5C (var3, 0x00000010, var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00B5C (var3, 0x00000013, "browser_start", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00D5C (var3, 0x00000014, var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00D5C (var3, 0x00000018, var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00B5C (var3, 0x0000001B, "num_fonts", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00D5C (var3, 0x0000002E, var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001BA0
 */
int sub_01BA0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00B5C (arg1, 0x00000005, "char_size", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00B5C (var3, 0x00000005, "disp_mode", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00D5C (var3, 0x00000006, var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001C44
 */
int sub_01C44 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var5 = sub_00D5C (arg1, 0x00000004, var2, var1);
  var6 = var5;
  if (var5 == 0x00000000)
  {
    var12 = sub_00B5C (arg1, 0x00000006, "audio_gain", var2, var1);
    var6 = var12;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x00001CC0
 */
int sub_01CC0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00D5C (arg1, 0x00000007, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00B5C (var3, 0x00000002, "lr_button_enable", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00B5C (var3, 0x00000005, "connect_mode", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00B5C (var3, 0x00000005, "flash_activated", var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00B5C (var3, 0x00000005, "flash_play", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00B5C (var3, 0x00000006, "broadcast_standard_video1", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00B5C (var3, 0x00000006, "broadcast_standard_video2", var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001E04
 */
int sub_01E04 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = arg3;
  ((int *) sp)[0] = s0;
  var3 = arg2;
  ((int *) sp)[3] = ra;
  if (((arg2 < 0x00000004)) != 0x00000000)
  {

  label11:

  label12:
    var6 = sub_00B5C (var1, 0x00000011, "dynamic_normalizer", var3, var2);
    var7 = var6;
    if (var6 == 0x00000000)
    {
      var13 = sub_00B5C (var1, 0x00000006, "version", var3, var2);
      var7 = var13;
      if (!(var13 != 0x00000000))
      {
        var16 = sub_00B5C (var1, 0x00000006, "tv_channel_range", var3, var2);
        var7 = var16;
        if (!(var16 != 0x00000000))
        {
          var19 = sub_00B5C (var1, 0x00000006, "tuner_type_no", var3, var2);
          var7 = var19;
          if (!(var19 != 0x00000000))
          {
            var22 = sub_00B5C (var1, 0x00000006, "input_line_no", var3, var2);
            var7 = var22;
            if (!(var22 != 0x00000000))
            {
              var25 = sub_00B5C (var1, 0x00000006, "audio_channel", var3, var2);
              var7 = var25;
            }
          }
        }
      }
    }
  }
  else
  {
    if (((arg2 < 0x00000006)) != 0x00000000)
    {

    label7:
      var28 = sub_00B5C (arg1, 0x00000018, "auto_setting", var3, var2);
      var7 = var28;
      if (!(var28 != 0x00000000))
      {
        goto label12;
      }
    }
    else
    {
      if (arg2 == 0x00000007)
        goto label7;
      goto label11;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001F5C
 */
int sub_01F5C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00B5C (arg1, 0x0000000E, "umd_autoboot", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00D5C (var3, 0x00000008, var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00D5C (var3, 0x00000009, var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00D5C (var3, 0x0000000A, var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00B5C (var3, 0x00000005, "proxy_protect", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00B5C (var3, 0x00000005, "proxy_autoauth", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00B5C (var3, 0x00000005, "proxy_user", var2, var1);
              var7 = var28;
              if (!(var28 != 0x00000000))
              {
                var31 = sub_00B5C (var3, 0x00000005, "proxy_password", var2, var1);
                var7 = var31;
                if (!(var31 != 0x00000000))
                {
                  var34 = sub_00B5C (var3, 0x00000018, "wifisvc_setting", var2, var1);
                  var7 = var34;
                  if (!(var34 != 0x00000000))
                  {
                    var37 = sub_00B5C (var3, 0x00000004, "visualizer_mode", var2, var1);
                    var7 = var37;
                    if (!(var37 != 0x00000000))
                    {
                      var40 = sub_00B5C (var3, 0x00000004, "track_info_mode", var2, var1);
                      var7 = var40;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002108
 */
int sub_02108 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00D5C (arg1, 0x0000000B, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00B5C (var3, 0x00000009, "ps3_name", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00B5C (var3, 0x00000009, "ps3_mac", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00B5C (var3, 0x00000009, "ps3_keytype", var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00B5C (var3, 0x00000009, "ps3_key", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00B5C (var3, 0x00000018, "wifisvc_setting", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00B5C (var3, 0x00000005, "webpage_quality", var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0000224C
 */
int sub_0224C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var5 = sub_00B5C (arg1, 0x00000018, "wifisvc_setting", var2, var1);
  var6 = var5;
  if (var5 == 0x00000000)
  {
    var12 = sub_00B5C (arg1, 0x00000006, "shared_remocon_setting", var2, var1);
    var6 = var12;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x000022D0
 */
int sub_022D0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00D5C (arg1, 0x0000000C, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00B5C (var3, 0x00000009, "custom_video_bitrate1", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00B5C (var3, 0x00000009, "custom_video_bitrate2", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00B5C (var3, 0x00000009, "custom_video_buffer1", var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00B5C (var3, 0x00000009, "custom_video_buffer2", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00B5C (var3, 0x00000009, "setting_internet", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00D5C (var3, 0x00000019, var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0000240C
 */
int sub_0240C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00B5C (arg1, 0x0000000E, "usb_charge", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00B5C (var3, 0x0000000E, "umd_cache", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00B5C (var3, 0x0000000B, "screensaver_start_time", var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x000024B8
 */
int sub_024B8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00B5C (arg1, 0x00000010, "custom_theme_mode", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00B5C (var3, 0x00000009, "button_assign", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00B5C (var3, 0x00000002, "list_play_mode", var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002564
 */
int sub_02564 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg2;
  ((int *) sp)[2] = s2;
  var2 = arg3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  if (((var1 < 0x0000000C)) == 0x00000000)
  {
    var3 = 0x0000000D;

  label5:
    if (var1 != var3)
    {

    label12:
      var10 = sub_00B5C (arg1, 0x00000008, "alarm_1_time", var1, var2);
      var7 = var10;
    }
    else
    {

    label8:
      var6 = sub_00B5C (arg1, 0x00000018, "auto_setting", arg2, var2);
      var7 = var6;
      if (!(var6 != 0x00000000))
      {
        goto label12;
      }
    }
  }
  else
  {
    var3 = 0x00000006;
    if (((var1 < 0x00000009)) != 0x00000000)
      goto label5;
    goto label8;
  }
  ra = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002610
 */
int sub_02610 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var5 = sub_00B5C (arg1, 0x00000018, "wifisvc_setting", var2, var1);
  var6 = var5;
  if (var5 == 0x00000000)
  {
    var12 = sub_00B5C (arg1, 0x00000009, "flags", var2, var1);
    var6 = var12;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x00002694
 */
int sub_02694 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = ra;
  ((int *) sp)[21] = s5;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  var1 = arg3;
  ((int *) sp)[18] = s2;
  var2 = arg2;
  ((int *) sp)[17] = s1;
  var3 = arg1;
  ((int *) sp)[16] = s0;
  var4 = 0x00000002;
  while (1) {
    var5 = sp;
    scePaf_15AFC8D3 (var5, 0x0000001B, "alarm_%d_time", 0x00000002);
    var8 = sp;
    var11 = sub_00B5C (var3, 0x00000008, var8, var2, var1);
    var4 = var4 + 0x00000001;
    var12 = var11;
    if (var11 != 0x00000000)
      break;
    if (((var4 < 0x0000000A)) != 0x00000000)
      continue;
    var13 = 0x00000000;
    var14 = sp + 0x00000020;
    while (1) {
      scePaf_15AFC8D3 (var14, 0x0000001B, "alarm_%d_property", 0x00000000);
      var19 = sub_00B5C (var3, 0x00000008, var14, var2, var1);
      var13 = var13 + 0x00000001;
      var12 = var19;
      if (var19 != 0x00000000)
        break;
      if (((var13 < 0x0000000A)) != 0x00000000)
        continue;
      var22 = sub_00D5C (var3, 0x0000000D, var2, var1);
      var12 = (var22) ? var22 : 0x00000000;
      goto label19;
    }
  }

label19:
  ra = ((int *) sp)[22];
  var23 = ((int *) sp)[21];
  var24 = ((int *) sp)[20];
  var25 = ((int *) sp)[19];
  var26 = ((int *) sp)[18];
  var27 = ((int *) sp)[17];
  var28 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return var12;
}

/**
 * Subroutine at address 0x000027A0
 */
int sub_027A0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00B5C (arg1, 0x0000000B, "color_space_mode", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00B5C (var3, 0x0000000E, "usb_auto_connect", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00B5C (var3, 0x0000000B, "pi_blending_mode", var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0000284C
 */
int sub_0284C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[37] = s1;
  var1 = arg3;
  ((int *) sp)[36] = s0;
  var2 = arg2;
  ((int *) sp)[38] = s2;
  var3 = arg1;
  ((int *) sp)[41] = ra;
  ((int *) sp)[40] = s4;
  ((int *) sp)[39] = s3;
  var6 = sub_00B5C (arg1, 0x0000000C, "nav_only", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var15 = sub_00B5C (var3, 0x0000000C, "np_ad_clock_diff", var2, var1);
    var7 = var15;
    if (!(var15 != 0x00000000))
    {
      var18 = sub_00B5C (var3, 0x00000012, "active_backlight_mode", var2, var1);
      var7 = var18;
      if (!(var18 != 0x00000000))
      {
        var19 = sp + 0x00000080;
        ((int *) sp)[32] = 0x00000001;
        var22 = vsh_0A9043D4 (var3, "/CONFIG/SYSTEM/POWER_SAVING/active_backlight_mode", 0x00000004, var19);
        var7 = var22;
        if (!(var22 != 0x00000000))
        {
          var25 = sub_00B5C (var3, 0x00000002, "title_display_mode", var2, var1);
          var7 = var25;
          if (!(var25 != 0x00000000))
          {
            var28 = sub_00B5C (var3, 0x00000009, "account_id", var2, var1);
            var7 = var28;
            if (!(var28 != 0x00000000))
            {
              var29 = sp;
              scePaf_6439FDBC (var29, 0x00000000, 0x00000010);
              var32 = sp;
              var35 = vsh_55DD305F (var3, "/CONFIG/NP/account_id", 0x00000004, 0x00000010, var32);
              var7 = var35;
              if (!(var35 != 0x00000000))
              {
                var36 = sp;
                var39 = vsh_0A9043D4 (var3, "/CONFIG/PREMO/account_id", 0x00000010, var36);
                var7 = var39;
                if (!(var39 != 0x00000000))
                {
                  var42 = sub_00B5C (var3, 0x00000009, "login_id", var2, var1);
                  var7 = var42;
                  if (!(var42 != 0x00000000))
                  {
                    var43 = sp + 0x00000010;
                    scePaf_6439FDBC (var43, 0x00000000, 0x00000041);
                    var48 = vsh_55DD305F (var3, "/CONFIG/NP/login_id", 0x00000003, 0x00000041, var43);
                    var7 = var48;
                    if (!(var48 != 0x00000000))
                    {
                      var51 = scePaf_967A56EF (var43);
                      var7 = 0x80108401;
                      if (!(((var51 < 0x00000041)) == 0x00000000))
                      {
                        var54 = vsh_0A9043D4 (var3, "/CONFIG/PREMO/login_id", (var51 + 0x00000001), var43);
                        var7 = var54;
                        if (!(var54 != 0x00000000))
                        {
                          var57 = sub_00B5C (var3, 0x00000009, "password", var2, var1);
                          var7 = var57;
                          if (!(var57 != 0x00000000))
                          {
                            var58 = sp + 0x00000060;
                            scePaf_6439FDBC (var58, 0x00000000, 0x0000001F);
                            var63 = vsh_55DD305F (var3, "/CONFIG/NP/password", 0x00000003, 0x0000001F, var58);
                            var7 = var63;
                            if (!(var63 != 0x00000000))
                            {
                              var66 = scePaf_967A56EF (var58);
                              var7 = 0x80108401;
                              if (!(((var66 < 0x0000001F)) == 0x00000000))
                              {
                                var69 = vsh_0A9043D4 (var3, "/CONFIG/PREMO/password", (var66 + 0x00000001), var58);
                                var7 = var69;
                                if (!(var69 != 0x00000000))
                                {
                                  var72 = sub_00B5C (var3, 0x0000000C, "account_id", var2, var1);
                                  var7 = var72;
                                  if (!(var72 != 0x00000000))
                                  {
                                    var75 = sub_00B5C (var3, 0x00000002, "output_ext_menu", var2, var1);
                                    var7 = var75;
                                    if (!(var75 != 0x00000000))
                                    {
                                      var78 = sub_00B5C (var3, 0x00000002, "output_ext_func", var2, var1);
                                      var7 = var78;
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[41];
  var8 = ((int *) sp)[40];
  var9 = ((int *) sp)[39];
  var10 = ((int *) sp)[38];
  var11 = ((int *) sp)[37];
  var12 = ((int *) sp)[36];
  sp = sp + 0x000000B0;
  return var7;
}

/**
 * Subroutine at address 0x00002B5C
 */
int vsh_6850458D (int arg1)
{
  sp = sp + 0xFFFFFEA0;
  ((int *) sp)[81] = s5;
  var1 = 0x80108401;
  var2 = arg1;
  ((int *) sp)[85] = ra;
  ((int *) sp)[84] = fp;
  ((int *) sp)[83] = s7;
  ((int *) sp)[82] = s6;
  ((int *) sp)[80] = s4;
  ((int *) sp)[79] = s3;
  ((int *) sp)[78] = s2;
  ((int *) sp)[77] = s1;
  ((int *) sp)[76] = s0;
  if (arg1 == 0x00000000)
  {

  label97:
    ra = ((int *) sp)[85];
  }
  else
  {
    var3 = sp;
    scePaf_6439FDBC (var3, 0x00000000, 0x00000110);
    var6 = sp + 0x00000004;
    ((int *) sp)[0] = 0x00000001;
    scePaf_98DE3BA6 (var6, 0x00037A2C);
    var11 = scePaf_967A56EF (0x00037A2C);
    var12 = sp;
    var13 = sp + 0x00000110;
    ((int *) sp)[65] = var11;
    ((int *) sp)[67] = 0x00000001;
    ((int *) sp)[66] = 0x00000001;
    var1 = sceReg_92E41280 (var12, 0x00000001, var13);
    ra = ((int *) sp)[85];
    if (!(var1 != 0x00000000))
    {
      var16 = *((int *) 0x00045598);
      ((int *) sp)[71] = 0x00000000;
      if (var16 == 0x00000000)
      {

      label89:
        var73 = ((int *) sp)[68];
        sceReg_39461B4D (var73);
        var76 = ((int *) sp)[68];
        sceReg_FA8A5739 (var76);
        var1 = sceUtility_netparam_internal_F547B8FC (0x00000000);
        if (var1 == 0x00000000)
        {
          var1 = 0x00000000;
        }
      }
      else
      {
        ((int *) sp)[72] = 0x00000000;
        var17 = 0x00000000;
        var18 = 0x00045598;
        while (1) {
          var19 = ((int *) var18)[0];
          var20 = ((int *) sp)[68];
          var21 = sp + 0x00000114;
          var24 = sceReg_1D8A762E (var20, var19, 0x00000001, var21);
          var25 = var24;
          if (var24 != 0x00000000)
            break;
          var26 = ((int *) sp)[72];
          var27 = ((int *) ((var26 << 0x00000004) + 0x0003B600))[0];
          var28 = ((int *) sp)[71];
          var29 = 0x00000000;
          if (var27 == 0x00000000)
          {

          label84:
            var62 = ((int *) sp)[71];
            var63 = ((int *) sp)[72];
            var64 = ((int *) sp)[69];
            ((int *) sp)[72] = (var63 + 0x00000021);
            ((int *) sp)[71] = (var62 + 0x00000001);
            sceReg_0D69BF40 (var64);
            var67 = ((int *) sp)[69];
            sceReg_0CAE832B (var67);
            var70 = ((int *) sp)[71];
            var71 = var70 << 0x00000002;
            var17 = var71;
            var72 = ((int *) (var71 + 0x00045598))[0];
            var18 = var17 + 0x00045598;
            if (var72 != 0x00000000)
              continue;
            goto label89;
          }
          else
          {
            var30 = ((int *) sp)[72];
            var31 = var17 + 0x00045598;
            var32 = (((var28 << 0x00000005) + var28) << 0x00000004) + 0x0003B600;
            while (1) {
              var33 = ((var30 + var29) << 0x00000004) + 0x0003B600;
              var34 = ((int *) var33)[3];
              var35 = ((int *) var31)[0];
              ((int *) sp)[70] = var34;
              var36 = ((int *) var33)[0];
              var37 = ((int *) var33)[1];
              var38 = ((int *) var33)[2];
              var41 = scePaf_E3D530AE (var35, "/SYSPROFILE");
              if (var41 == 0x00000000)
              {
                var127 = scePaf_E3D530AE (var36, "sound_reduction");
                if (var127 != 0x00000000)
                {
                  var129 = ((int *) var31)[0];
                }
                else
                {
                  var128 = ((int *) var2)[2];
                  ((int *) sp)[70] = var128;

                label29:
                  var42 = ((int *) var31)[0];
                }
              }
              else
              {
                goto label29;
              }
              var45 = scePaf_E3D530AE (var42, "/CONFIG/SYSTEM/LOCK");
              if (var45 == 0x00000000)
              {
                var122 = scePaf_E3D530AE (var36, "parental_level");
                if (var122 != 0x00000000)
                {
                  var124 = ((int *) var31)[0];
                }
                else
                {
                  var123 = ((int *) var2)[3];
                  ((int *) sp)[70] = var123;

                label38:
                  var46 = ((int *) var31)[0];
                }
              }
              else
              goto label38;
              var49 = scePaf_E3D530AE (var46, "/CONFIG/SYSTEM/XMB/THEME");
              if (var49 == 0x00000000)
              {
                var115 = scePaf_E3D530AE (var36, "color_mode");
                if (var115 != 0x00000000)
                {
                  var119 = scePaf_E3D530AE (var36, "system_color");
                  if (var119 != 0x00000000)
                  {
                    var50 = ((int *) var31)[0];
                  }
                  else
                  {
                    var116 = ((int *) var2)[5];

                  label51:
                    ((int *) sp)[70] = var116;

                  label52:
                    var50 = ((int *) var31)[0];
                  }
                }
                else
                {
                  var116 = ((int *) var2)[4];
                  goto label51;
                }
              }
              else
              goto label52;
              var51 = ((int *) var2)[0];
              var52 = ((int *) var2)[1];
              var53 = sp + 0x00000118;
              sub_00F78 (var50, var36, var51, var52, var53);
              var56 = ((int *) sp)[69];
              var59 = sceReg_57641A81 (var56, var36, (var37 & 0x0000FFFF), var38);
              var25 = var59;
              if (var59 != 0x00000000)
                break;
              if (var37 == 0x00000003)
              {
                var107 = ((int *) sp)[70];
                var110 = scePaf_967A56EF (var107);
                var111 = ((int *) sp)[69];
                var112 = ((int *) sp)[70];

              label74:
                var99 = sceReg_17768E14 (var60, var36, var96, var38);
                var25 = var99;
              }
              else
              {
                if (((var37 < 0x00000004)) == 0x00000000)
                {
                  if (var37 == 0x00000004)
                  {
                    var105 = ((int *) sp)[69];
                    var106 = ((int *) sp)[70];
                    goto label74;
                  }
                  else
                  {
                    var100 = ((int *) sp)[69];
                    if (!(var37 != 0x00010004))
                    {
                      var101 = ((int *) sp)[70];
                      var104 = sub_00AC0 (var100, var36, var101, var38);
                      var25 = var104;
                    }
                  }
                }
                else
                {
                  var60 = ((int *) sp)[69];
                  if (var37 == 0x00000002)
                  {
                    var96 = sp + 0x00000118;
                    goto label74;
                  }
                }
              }
              var32 = var32 + 0x00000010;
              if (var25 != 0x00000000)
                break;
              var61 = ((int *) var32)[0];
              var29 = var29 + 0x00000001;
              var30 = var30;
              if (var61 != 0x00000000)
                continue;
              goto label84;
            }
            var90 = ((int *) sp)[69];
            sceReg_0CAE832B (var90);
            goto label80;
          }
          goto label97;
        }

      label80:
        var93 = ((int *) sp)[68];
        sceReg_FA8A5739 (var93);
        var1 = var25;
      }
      goto label97;
    }
  }
  var81 = ((int *) sp)[84];
  var82 = ((int *) sp)[83];
  var83 = ((int *) sp)[82];
  var84 = ((int *) sp)[81];
  var85 = ((int *) sp)[80];
  var86 = ((int *) sp)[79];
  var87 = ((int *) sp)[78];
  var88 = ((int *) sp)[77];
  var89 = ((int *) sp)[76];
  sp = sp + 0x00000160;
  return var1;
}

/**
 * Subroutine at address 0x00002F04
 */
int vsh_1ECEF793 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[76] = s0;
  ((int *) sp)[80] = s4;
  var1 = arg3;
  ((int *) sp)[79] = s3;
  var2 = arg2;
  ((int *) sp)[78] = s2;
  var3 = sp;
  ((int *) sp)[82] = ra;
  ((int *) sp)[77] = s1;
  ((int *) sp)[81] = s5;
  ((int *) sp)[72] = 0x00000000;
  scePaf_6439FDBC (var3, 0x00000000, 0x00000110);
  var6 = sp + 0x00000004;
  ((int *) sp)[0] = 0x00000001;
  scePaf_98DE3BA6 (var6, 0x00037A2C);
  var11 = scePaf_967A56EF (0x00037A2C);
  var12 = sp;
  var13 = sp + 0x00000110;
  ((int *) sp)[65] = var11;
  ((int *) sp)[66] = 0x00000001;
  ((int *) sp)[67] = 0x00000001;
  var16 = sceReg_92E41280 (var12, 0x00000002, var13);
  ra = ((int *) sp)[82];
  if (!(var16 != 0x00000000))
  {
    if (arg1 == 0x00000001)
    {

    label144:
      var78 = ((int *) sp)[68];
      sceReg_FA8A5739 (var78);
      var16 = 0x00000000;
    }
    else
    {
      var17 = ((int *) sp)[68];
      var18 = sp + 0x00000114;
      var21 = sceReg_1D8A762E (var17, "/REGISTRY", 0x00000002, var18);
      var22 = var21;
      if (var21 != 0x00000000)
      {

      label149:
        var66 = ((int *) sp)[68];
        sceReg_FA8A5739 (var66);
        var16 = var22;
      }
      else
      {
        var23 = ((int *) sp)[69];
        var24 = sp + 0x00000118;
        var25 = sp + 0x0000011C;
        var28 = sceReg_C5768D02 (var23, 0x00036BF0, var24, var25);
        var22 = var28;
        if (var28 != 0x00000000)
        {

        label147:
          var63 = ((int *) sp)[69];
          sceReg_0CAE832B (var63);
          goto label149;
        }
        else
        {
          var29 = ((int *) sp)[70];
          if (var29 != 0x00000002)
          {
            var151 = ((int *) sp)[71];

          label152:
            var32 = ((int *) sp)[69];
            sceReg_0CAE832B (var32);
            var35 = ((int *) sp)[68];
            sceReg_FA8A5739 (var35);
            var16 = 0x80108401;
          }
          else
          {
            var30 = ((int *) sp)[71];
            var31 = ((int *) sp)[69];
            if (!(var30 == 0x00000004))
              goto label152;
            var44 = sp + 0x00000120;
            var47 = sceReg_30BE0259 (var31, 0x00036BF0, var44, 0x00000004);
            var22 = var47;
            if (var47 != 0x00000000)
              goto label147;
            var48 = ((int *) sp)[69];
            sceReg_0CAE832B (var48);
            var51 = ((int *) sp)[72];
            if (var51 == 0x0000004C)
              goto label144;
            if (var51 <= 0)
            {
              var147 = ((int *) sp)[68];
              var150 = sub_01924 (var147);
              var22 = var150;
              if (var150 != 0x00000000)
                goto label149;
              var51 = 0x00000001;
              ((int *) sp)[72] = 0x00000001;

            label33:
              if (((var51 < 0x00000006)) != 0x00000000)
              {
                var143 = ((int *) sp)[68];
                var146 = sub_01A7C (var143, var2, var1);
                var22 = var146;
                if (var146 != 0x00000000)
                  goto label149;
                var51 = 0x00000006;
                ((int *) sp)[72] = 0x00000006;

              label39:
                if (((var51 < 0x00000013)) != 0x00000000)
                {
                  var139 = ((int *) sp)[68];
                  var142 = sub_01BA0 (var139, var2, var1);
                  var22 = var142;
                  if (var142 != 0x00000000)
                    goto label149;
                  var51 = 0x00000013;
                  ((int *) sp)[72] = 0x00000013;

                label45:
                  if (((var51 < 0x00000014)) != 0x00000000)
                  {
                    var135 = ((int *) sp)[68];
                    var138 = sub_01C44 (var135, var2, var1);
                    var22 = var138;
                    if (var138 != 0x00000000)
                      goto label149;
                    var51 = 0x00000014;
                    ((int *) sp)[72] = 0x00000014;

                  label51:
                    if (((var51 < 0x0000001B)) != 0x00000000)
                    {
                      var131 = ((int *) sp)[68];
                      var134 = sub_01CC0 (var131, var2, var1);
                      var22 = var134;
                      if (var134 != 0x00000000)
                        goto label149;
                      var51 = 0x0000001B;
                      ((int *) sp)[72] = 0x0000001B;

                    label57:
                      if (((var51 < 0x00000020)) != 0x00000000)
                      {
                        var127 = ((int *) sp)[68];
                        var130 = sub_01E04 (var127, var2, var1);
                        var22 = var130;
                        if (var130 != 0x00000000)
                          goto label149;
                        var51 = 0x00000020;
                        ((int *) sp)[72] = 0x00000020;

                      label63:
                        if (((var51 < 0x00000026)) != 0x00000000)
                        {
                          var123 = ((int *) sp)[68];
                          var126 = sub_01F5C (var123, var2, var1);
                          var22 = var126;
                          if (var126 != 0x00000000)
                            goto label149;
                          var51 = 0x00000026;
                          ((int *) sp)[72] = 0x00000026;

                        label69:
                          if (((var51 < 0x0000002C)) != 0x00000000)
                          {
                            var119 = ((int *) sp)[68];
                            var122 = sub_02108 (var119, var2, var1);
                            var22 = var122;
                            if (var122 != 0x00000000)
                              goto label149;
                            var51 = 0x0000002C;
                            ((int *) sp)[72] = 0x0000002C;

                          label75:
                            if (((var51 < 0x00000031)) != 0x00000000)
                            {
                              var115 = ((int *) sp)[68];
                              var118 = sub_0224C (var115, var2, var1);
                              var22 = var118;
                              if (var118 != 0x00000000)
                                goto label149;
                              var51 = 0x00000031;
                              ((int *) sp)[72] = 0x00000031;

                            label81:
                              if (((var51 < 0x00000035)) != 0x00000000)
                              {
                                var111 = ((int *) sp)[68];
                                var114 = sub_022D0 (var111, var2, var1);
                                var22 = var114;
                                if (var114 != 0x00000000)
                                  goto label149;
                                var51 = 0x00000035;
                                ((int *) sp)[72] = 0x00000035;

                              label87:
                                if (((var51 < 0x00000036)) != 0x00000000)
                                {
                                  var107 = ((int *) sp)[68];
                                  var110 = sub_0240C (var107, var2, var1);
                                  var22 = var110;
                                  if (var110 != 0x00000000)
                                    goto label149;
                                  var51 = 0x00000036;
                                  ((int *) sp)[72] = 0x00000036;

                                label93:
                                  if (((var51 < 0x0000003B)) != 0x00000000)
                                  {
                                    var103 = ((int *) sp)[68];
                                    var106 = sub_024B8 (var103, var2, var1);
                                    var22 = var106;
                                    if (var106 != 0x00000000)
                                      goto label149;
                                    var51 = 0x0000003B;
                                    ((int *) sp)[72] = 0x0000003B;

                                  label99:
                                    if (((var51 < 0x0000003E)) != 0x00000000)
                                    {
                                      var99 = ((int *) sp)[68];
                                      var102 = sub_02564 (var99, var2, var1);
                                      var22 = var102;
                                      if (var102 != 0x00000000)
                                        goto label149;
                                      var51 = 0x0000003E;
                                      ((int *) sp)[72] = 0x0000003E;

                                    label105:
                                      if (((var51 < 0x00000040)) != 0x00000000)
                                      {
                                        var95 = ((int *) sp)[68];
                                        var98 = sub_02610 (var95, var2, var1);
                                        var22 = var98;
                                        if (var98 != 0x00000000)
                                          goto label149;
                                        var51 = 0x00000040;
                                        ((int *) sp)[72] = 0x00000040;

                                      label111:
                                        if (((var51 < 0x00000043)) != 0x00000000)
                                        {
                                          var91 = ((int *) sp)[68];
                                          var94 = sub_02694 (var91, var2, var1);
                                          var22 = var94;
                                          if (var94 != 0x00000000)
                                            goto label149;
                                          var51 = 0x00000043;
                                          ((int *) sp)[72] = 0x00000043;

                                        label117:
                                          if (((var51 < 0x00000046)) != 0x00000000)
                                          {
                                            var87 = ((int *) sp)[68];
                                            var90 = sub_027A0 (var87, var2, var1);
                                            var22 = var90;
                                            if (var90 != 0x00000000)
                                              goto label149;
                                            var51 = 0x00000046;
                                            ((int *) sp)[72] = 0x00000046;

                                          label123:
                                            var52 = ((int *) sp)[68];
                                            if (((var51 < 0x0000004C)) != 0x00000000)
                                            {
                                              var86 = sub_0284C (var52, var2, var1);
                                              var22 = var86;
                                              if (var86 != 0x00000000)
                                                goto label149;
                                              var51 = 0x0000004C;
                                              ((int *) sp)[72] = 0x0000004C;

                                            label128:
                                              if (var51 != 0x0000004C)
                                              {
                                                var81 = ((int *) sp)[68];
                                                sceReg_FA8A5739 (var81);
                                                var16 = 0x80108402;
                                              }
                                              else
                                              {
                                                var53 = ((int *) sp)[68];
                                                var54 = sp + 0x00000114;
                                                var57 = sceReg_1D8A762E (var53, "/REGISTRY", 0x00000002, var54);
                                                var22 = var57;
                                                if (var57 != 0x00000000)
                                                  goto label149;
                                                var58 = ((int *) sp)[69];
                                                var59 = sp + 0x00000120;
                                                var62 = sceReg_17768E14 (var58, "category_version", var59, 0x00000004);
                                                var22 = var62;
                                                if (!(var62 == 0x00000000))
                                                  goto label147;
                                                var69 = ((int *) sp)[69];
                                                sceReg_0D69BF40 (var69);
                                                var72 = ((int *) sp)[69];
                                                sceReg_0CAE832B (var72);
                                                var75 = ((int *) sp)[68];
                                                sceReg_39461B4D (var75);
                                                goto label144;
                                              }
                                            }
                                            else
                                            goto label128;
                                          }
                                          else
                                          goto label123;
                                        }
                                        else
                                        goto label117;
                                      }
                                      else
                                      goto label111;
                                    }
                                    else
                                    goto label105;
                                  }
                                  else
                                  goto label99;
                                }
                                else
                                goto label93;
                              }
                              else
                              goto label87;
                            }
                            else
                            goto label81;
                          }
                          else
                          goto label75;
                        }
                        else
                        goto label69;
                      }
                      else
                      goto label63;
                    }
                    else
                    goto label57;
                  }
                  else
                  goto label51;
                }
                else
                goto label45;
              }
              else
              goto label39;
            }
            else
            goto label33;
          }
        }
      }
    }
    ra = ((int *) sp)[82];
  }
  var38 = ((int *) sp)[81];
  var39 = ((int *) sp)[80];
  var40 = ((int *) sp)[79];
  var41 = ((int *) sp)[78];
  var42 = ((int *) sp)[77];
  var43 = ((int *) sp)[76];
  sp = sp + 0x00000150;
  return var16;
}

/**
 * Subroutine at address 0x000033D8
 */
int vsh_656B99C8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  scePaf_6439FDBC (arg1, 0x00000000, 0x00000110);
  ((int *) var1)[0] = 0x00000001;
  scePaf_98DE3BA6 ((var1 + 0x00000004), 0x00037A2C);
  var8 = scePaf_967A56EF (0x00037A2C);
  ((int *) var1)[65] = var8;
  ((int *) var1)[67] = 0x00000001;
  ((int *) var1)[66] = 0x00000001;
  var11 = sceReg_92E41280 (var1, 0x00000002, arg2);
  ra = ((int *) sp)[4];
  var12 = ((int *) sp)[3];
  var13 = ((int *) sp)[2];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var11;
}

/**
 * Subroutine at address 0x00003460
 */
int vsh_55DD305F (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFDB0;
  ((int *) sp)[145] = s5;
  var1 = 0x00000000;
  ((int *) sp)[144] = s4;
  ((int *) sp)[143] = s3;
  ((int *) sp)[142] = s2;
  ((int *) sp)[140] = s0;
  ((int *) sp)[146] = ra;
  ((int *) sp)[141] = s1;
  if (arg2 == 0x00000000)
  {

  label30:
    ra = ((int *) sp)[146];
  }
  else
  {
    var2 = sp;
    var3 = sp + 0x00000110;
    scePaf_6439FDBC (var2, 0x00000000, 0x00000101);
    scePaf_6439FDBC (var3, 0x00000000, 0x00000101);
    var8 = sp;
    var1 = sub_00A2C (arg2, var8, var3);
    if (!(var1 == 0x00000000))
      goto label30;
    var17 = sp;
    var18 = sp + 0x00000220;
    var1 = sceReg_1D8A762E (arg1, var17, 0x00000002, var18);
    ra = ((int *) sp)[146];
    if (!(var1 != 0x00000000))
    {
      var21 = ((int *) sp)[136];
      var22 = sp + 0x00000224;
      var23 = sp + 0x00000228;
      var26 = sceReg_C5768D02 (var21, var3, var22, var23);
      var27 = var26;
      if (var26 != 0x00000000)
      {

      label24:
        var37 = ((int *) sp)[136];
        sceReg_0CAE832B (var37);
        var1 = var27;
      }
      else
      {
        var28 = ((int *) sp)[137];
        var29 = ((int *) sp)[138];
        if (var28 != arg3)
        {

        label27:
          var31 = ((int *) sp)[136];
          sceReg_0CAE832B (var31);
          var1 = 0x80108401;
        }
        else
        {
          var30 = ((int *) sp)[136];
          if (!(((arg4 < var29)) == 0x00000000))
            goto label27;
          var36 = sceReg_30BE0259 (var30, var3, arg5, var29);
          var27 = var36;
          if (!(var36 == 0x00000000))
            goto label24;
          var40 = ((int *) sp)[136];
          sceReg_0CAE832B (var40);
          var1 = 0x00000000;
        }
      }
      goto label30;
    }
  }
  var11 = ((int *) sp)[145];
  var12 = ((int *) sp)[144];
  var13 = ((int *) sp)[143];
  var14 = ((int *) sp)[142];
  var15 = ((int *) sp)[141];
  var16 = ((int *) sp)[140];
  sp = sp + 0x00000250;
  return var1;
}

/**
 * Subroutine at address 0x00003590
 */
int vsh_0A9043D4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFDB0;
  ((int *) sp)[140] = s0;
  var1 = arg2;
  var2 = 0x00000000;
  ((int *) sp)[144] = s4;
  var3 = arg1;
  ((int *) sp)[143] = s3;
  var4 = sp;
  ((int *) sp)[142] = s2;
  ((int *) sp)[141] = s1;
  var5 = sp + 0x00000110;
  ((int *) sp)[145] = ra;
  if (!(var1 == 0x00000000))
  {
    scePaf_6439FDBC (var4, 0x00000000, 0x00000101);
    scePaf_6439FDBC (var5, 0x00000000, 0x00000101);
    var10 = sp;
    var2 = sub_00A2C (var1, var10, var5);
    var13 = sp;
    var14 = sp + 0x00000220;
    if (var2 == 0x00000000)
    {
      var2 = sceReg_1D8A762E (var3, var13, 0x00000002, var14);
      if (!(var2 != 0x00000000))
      {
        var22 = ((int *) sp)[136];
        var25 = sceReg_17768E14 (var22, var5, arg4, arg3);
        if (var25 == 0x00000000)
        {
          var29 = ((int *) sp)[136];
          sceReg_0D69BF40 (var29);
          var32 = ((int *) sp)[136];
          sceReg_0CAE832B (var32);
          sceReg_39461B4D (var3);
          var2 = 0x00000000;
        }
        else
        {
          var26 = ((int *) sp)[136];
          sceReg_0CAE832B (var26);
          var2 = var25;
        }
      }
    }
  }
  ra = ((int *) sp)[145];
  var15 = ((int *) sp)[144];
  var16 = ((int *) sp)[143];
  var17 = ((int *) sp)[142];
  var18 = ((int *) sp)[141];
  var19 = ((int *) sp)[140];
  sp = sp + 0x00000250;
  return var2;
}

/**
 * Subroutine at address 0x00003688
 */
void vsh_5DBE63A9 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (arg2 == 0x00000000)
  {

  label7:
    sceReg_FA8A5739 (arg1);
    ra = ((int *) sp)[1];
  }
  else
  {
    if (arg2 == 0x00000001)
    {
      sceReg_39461B4D (arg1);
      goto label7;
    }
    else
    {
      ra = ((int *) sp)[1];
    }
  }
  var1 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000036D8
 */
void vsh_35236F9E (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/LOCK/password", 0x00000004, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000375C
 */
void vsh_D968423F (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/SYSTEM/LOCK/password", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000037DC
 */
void vsh_E3DD9858 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/LOCK/parental_level", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003860
 */
void vsh_4011EA0D (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/owner_name", 0x00000003, 0x00000080, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000038E4
 */
void vsh_45E437F4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[73] = s1;
  var1 = arg2;
  ((int *) sp)[74] = s2;
  var2 = sp + 0x00000110;
  ((int *) sp)[75] = ra;
  var3 = sp;
  var4 = 0x80108401;
  ((int *) sp)[72] = s0;
  if (!(((var1 < 0x00000080)) == 0x00000000))
  {
    var7 = vsh_656B99C8 (var3, var2);
    var4 = var7;
    if (var7 == 0x00000000)
    {
      var11 = ((int *) sp)[68];
      var14 = vsh_0A9043D4 (var11, "/CONFIG/SYSTEM/owner_name", (var1 + 0x00000001), arg1);
      if (var14 == 0x00000000)
      {
        var18 = ((int *) sp)[68];
        vsh_5DBE63A9 (var18, 0x00000001);
        var4 = 0x00000000;
      }
      else
      {
        var15 = ((int *) sp)[68];
        vsh_5DBE63A9 (var15, 0x00000000);
        var4 = var14;
      }
    }
  }
  ra = ((int *) sp)[75];
  var8 = ((int *) sp)[74];
  var9 = ((int *) sp)[73];
  var10 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000398C
 */
void vsh_C3594B82 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/XMB/language", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003A10
 */
void vsh_065E6E94 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/SYSTEM/XMB/language", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003A90
 */
void vsh_F2843F4F (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/CHARACTER_SET/oem", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003B14
 */
void vsh_C1372F63 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/SYSTEM/CHARACTER_SET/oem", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003B94
 */
void vsh_EE385A98 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/CHARACTER_SET/ansi", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003C18
 */
void vsh_876F20B8 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/SYSTEM/CHARACTER_SET/ansi", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003C98
 */
void vsh_4B1CA54A (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/DATE/time_zone_area", 0x00000003, 0x00000030, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003D1C
 */
void vsh_EE43FEA4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[73] = s1;
  var1 = arg2;
  ((int *) sp)[74] = s2;
  var2 = sp + 0x00000110;
  ((int *) sp)[75] = ra;
  var3 = sp;
  var4 = 0x80108401;
  ((int *) sp)[72] = s0;
  if (!(((var1 < 0x00000030)) == 0x00000000))
  {
    var7 = vsh_656B99C8 (var3, var2);
    var4 = var7;
    if (var7 == 0x00000000)
    {
      var11 = ((int *) sp)[68];
      var14 = vsh_0A9043D4 (var11, "/CONFIG/DATE/time_zone_area", (var1 + 0x00000001), arg1);
      if (var14 == 0x00000000)
      {
        var18 = ((int *) sp)[68];
        vsh_5DBE63A9 (var18, 0x00000001);
        var4 = 0x00000000;
      }
      else
      {
        var15 = ((int *) sp)[68];
        vsh_5DBE63A9 (var15, 0x00000000);
        var4 = var14;
      }
    }
  }
  ra = ((int *) sp)[75];
  var8 = ((int *) sp)[74];
  var9 = ((int *) sp)[73];
  var10 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003DC4
 */
void vsh_0092A177 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/DATE/time_zone_offset", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003E44
 */
void vsh_B581C424 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/DATE/summer_time", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003EC8
 */
void vsh_7D77A1C4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[74] = s2;
  var1 = sp + 0x00000110;
  ((int *) sp)[72] = s0;
  var2 = sp;
  ((int *) sp)[75] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var9 = ((int *) sp)[68];
    var12 = vsh_55DD305F (var9, "/CONFIG/DATE/date_format", 0x00000002, 0x00000004, arg1);
    var13 = var12;
    if (var12 == 0x00000000)
    {
      var17 = ((int *) sp)[68];
      var20 = vsh_55DD305F (var17, "/CONFIG/DATE/time_format", 0x00000002, 0x00000004, arg2);
      var13 = var20;
      if (var20 != 0x00000000)
      {

      label15:
        var14 = ((int *) sp)[68];
        vsh_5DBE63A9 (var14, 0x00000000);
      }
      else
      {
        var21 = ((int *) sp)[68];
        vsh_5DBE63A9 (var21, 0x00000000);
      }
    }
    else
    {
      goto label15;
    }
  }
  ra = ((int *) sp)[75];
  var6 = ((int *) sp)[74];
  var7 = ((int *) sp)[73];
  var8 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003F80
 */
void vsh_28C74AD2 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/XMB/THEME/system_color", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004004
 */
void vsh_1A4D0803 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/SYSTEM/XMB/THEME/system_color", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004084
 */
void vsh_EBDBB130 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/MUSIC/wma_play", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004108
 */
void vsh_1C72085B (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/MUSIC/wma_play", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004188
 */
void vsh_D69A680D (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/BROWSER/flash_activated", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000420C
 */
void vsh_16108366 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/BROWSER/flash_activated", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000428C
 */
void vsh_19E718C5 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_0A9043D4 (var8, "/CONFIG/BROWSER/flash_play", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000430C
 */
void vsh_3C4DB1BE (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/SYSTEM/usb_charge", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004390
 */
void vsh_6E0911E4 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_656B99C8 (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_55DD305F (var8, "/CONFIG/NP/env", 0x00000003, 0x00000009, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_5DBE63A9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_5DBE63A9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004414
 */
void vsh_B113D62F (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[73] = s1;
  var1 = arg2;
  ((int *) sp)[74] = s2;
  var2 = sp + 0x00000110;
  ((int *) sp)[75] = ra;
  var3 = sp;
  var4 = 0x80108401;
  ((int *) sp)[72] = s0;
  if (!(((var1 < 0x00000009)) == 0x00000000))
  {
    var7 = vsh_656B99C8 (var3, var2);
    var4 = var7;
    if (var7 == 0x00000000)
    {
      var11 = ((int *) sp)[68];
      var14 = vsh_0A9043D4 (var11, "/CONFIG/NP/env", (var1 + 0x00000001), arg1);
      if (var14 == 0x00000000)
      {
        var18 = ((int *) sp)[68];
        vsh_5DBE63A9 (var18, 0x00000001);
        var4 = 0x00000000;
      }
      else
      {
        var15 = ((int *) sp)[68];
        vsh_5DBE63A9 (var15, 0x00000000);
        var4 = var14;
      }
    }
  }
  ra = ((int *) sp)[75];
  var8 = ((int *) sp)[74];
  var9 = ((int *) sp)[73];
  var10 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000044BC
 */
void sub_044BC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[55] = s7;
  var1 = arg1;
  ((int *) sp)[54] = s6;
  ((int *) sp)[50] = s2;
  ((int *) sp)[57] = ra;
  ((int *) sp)[56] = fp;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[49] = s1;
  ((int *) sp)[48] = s0;
  var2 = *((int *) 0x00047170);
  var3 = arg2;
  if (var2 == 0x00000001)
  {

  label47:
    ra = ((int *) sp)[57];
  }
  else
  {
    var4 = *((int *) 0x000471C0);
    if (!((var4 & 0x00000004) == 0x00000000))
      goto label47;
    var14 = sp;
    scePaf_5A693901 (var14);
    var17 = sp;
    sub_318F0 (var17, "opening_plugin");
    var20 = sp + 0x0000000C;
    sub_318F0 (var20, "__main__");
    var23 = sp + 0x00000028;
    var24 = sp + 0x00000050;
    ((int *) sp)[14] = 0x00000096;
    sub_318F0 (var23, "flash0:/vsh/resource/opening_plugin.rco");
    var27 = sp + 0x00000070;
    ((int *) sp)[15] = 0x0000F000;
    sub_318F0 (var24, "flash0:/vsh/module/opening_plugin.prx");
    var30 = sp + 0x00000044;
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[23] = 0x00000001;
    var31 = sp + 0x00000098;
    ((int *) sp)[24] = 0x00000003;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var27, "type");
    var36 = sub_31824 (var30, var27);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = var1;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var36)[0] = 0x00000000;
    ((int *) var36)[1] = var1;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var36 + 0x00000008), var31);
    sub_317D8 (var31);
    sub_317D8 (var27);
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var27, "color");
    var47 = sub_31824 (var30, var27);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = var3;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var47)[0] = 0x00000000;
    ((int *) var47)[1] = var3;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var47 + 0x00000008), var31);
    sub_317D8 (var31);
    sub_317D8 (var27);
    var54 = sp;
    scePaf_36C437F1 (var54, 0x00004B1C);
    var57 = *((int *) 0x000471C0);
    *((int *) 0x000471C0) = (var57 | 0x00000004);
    sub_317D8 (var24);
    sub_31808 (var30);
    sub_317D8 (var23);
    var64 = sp + 0x0000000C;
    sub_317D8 (var64);
    var67 = sp;
    sub_317D8 (var67);
    ra = ((int *) sp)[57];
  }
  var5 = ((int *) sp)[56];
  var6 = ((int *) sp)[55];
  var7 = ((int *) sp)[54];
  var8 = ((int *) sp)[53];
  var9 = ((int *) sp)[52];
  var10 = ((int *) sp)[51];
  var11 = ((int *) sp)[50];
  var12 = ((int *) sp)[49];
  var13 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x000046C8
 */
void sub_046C8 ()
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = ra;
  var1 = sp;
  sceVshCommonUtil_D87E8E2D (var1, "/CONFIG/SYSTEM/XMB/THEME");
  var4 = sp;
  var5 = sp + 0x00000020;
  var8 = sceVshCommonUtil_7A73DC84 (var4, "wallpaper_mode", var5);
  var9 = ((int *) sp)[8];
  var10 = (var8) ? 0x00000000 : var9;
  ((int *) sp)[8] = var10;
  if (!((((0x00000000 < var10)) & ((0x00000000 < (var10 ^ 0x00000004)))) == 0x00000000))
  {
    var11 = *((int *) 0x00047164);
    if (var11 != 0x00000000)
    {
      var17 = scePaf_4E87FDFC (var11, 0x00000001);
      if (!(var17 == 0x00000000))
      {
        var18 = ((int *) var17)[2];
        var21 var22 = (*var18) (0x00000001, 0x00000001);
      }
    }
  }
  var12 = sp;
  sceVshCommonUtil_625A9A5D (var12);
  ra = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00004768
 */
void sub_04768 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0004716C);
  if (var1 != 0x00000000)
  {
    var4 = scePaf_4E87FDFC (var1, 0x00000001);
    if (var4 == 0x00000000)
    {

    label9:
      ra = ((int *) sp)[0];
    }
    else
    {
      var5 = ((int *) var4)[2];
      var8 var9 = (*var5) (0x00000000);
      ra = ((int *) sp)[0];
    }
  }
  else
  goto label9;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000047B4
 */
void sub_047B4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x0004716C);
  if (var1 == 0x00000000)
  {
    var16 = sp;
    ((int *) sp)[0] = 0x000047B4;
    sub_319D4 (0x00047194, var16);
    ra = ((int *) sp)[5];
  }
  else
  {
    var4 = scePaf_4E87FDFC (var1, 0x00000001);
    if (!(var4 == 0x00000000))
    {
      var7 = scePaf_AB9A6186 (0x00000000, 0x000046C8, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00004768);
      var8 = ((int *) var4)[1];
      var9 = *((int *) 0x000471B4);
      var10 = *((int *) 0x000471B8);
      var13 var14 = (*var8) (var9, var10, 0x00040000);
    }
    ra = ((int *) sp)[5];
  }
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00004858
 */
void sub_04858 (int arg1, int arg2)
{
  *((int *) 0x000471B4) = arg1;
  *((int *) 0x000471B8) = arg2;
  return;
}

/**
 * Subroutine at address 0x0000486C
 */
void sub_0486C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = *((int *) 0x00047164);
  if (var1 == 0x00000000)
  {
    var13 = sp;
    ((int *) sp)[0] = 0x0000486C;
    sub_319D4 (0x000471A4, var13);
    ra = ((int *) sp)[4];
  }
  else
  {
    var4 = scePaf_4E87FDFC (var1, 0x00000001);
    if (var4 == 0x00000000)
    {

    label13:
      ra = ((int *) sp)[4];
    }
    else
    {
      var5 = *((int *) 0x000471C0);
      var6 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      var7 = var5 | 0x00000100;
      if (!((var5 & 0x00000100) == 0x00000000))
        goto label13;
      *((int *) 0x000471C0) = var7;
      var8 = ((int *) var4)[21];
      var11 var12 = (*var8) (0x00000001, var7, 0x00040000);
      ra = ((int *) sp)[4];
    }
  }
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00004900
 */
void sub_04900 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x00047164);
  if (var1 == 0x00000000)
  {
    var17 = sp;
    ((int *) sp)[0] = 0x00004900;
    sub_319D4 (0x000471A4, var17);
    ra = ((int *) sp)[5];
  }
  else
  {
    var4 = scePaf_4E87FDFC (var1, 0x00000001);
    if (!(var4 == 0x00000000))
    {
      var5 = ((int *) var4)[11];
      var8 var9 = (*var5) (0x0002F3E8, 0x0002F45C, 0x0002F490, 0x0002F4AC, 0x0002F0E0);
      var10 = ((int *) var4)[17];
      var11 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      var14 var15 = (*var10) (0x00000001);
    }
    ra = ((int *) sp)[5];
  }
  var16 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000049AC
 */
void sub_049AC (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[13] = ra;
  var2 = ((int *) arg1)[1];
  var3 = ((int *) arg1)[0];
  var4 = var3 + (var2 << 0x00000002);
  ((int *) sp)[0] = var3;
  ((int *) sp)[4] = var4;
  if (var3 != var4)
  {
    while (1) {
      var8 = ((int *) sp)[0];
      var9 = ((int *) var8)[0];
      var12 var13 = (*var9) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
      var14 = ((int *) var1)[1];
      var15 = ((int *) var1)[0];
      var16 = ((int *) sp)[0];
      var17 = var15 + (var14 << 0x00000002);
      var18 = var16 + 0x00000004;
      ((int *) sp)[8] = var16;
      ((int *) sp)[0] = var18;
      ((int *) sp)[4] = var17;
      if (var18 != var17)
        continue;
      break;
    }
  }
  sub_31A48 (var1);
  ra = ((int *) sp)[13];
  var7 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00004A30
 */
void sub_04A30 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x000471BC) = arg1;
  if (arg1 == 0x00000001)
  {
    var3 = *((int *) 0x000471B8);
    if (var3 != 0x00000000)
    {

    label17:
      sub_0486C ();
      sub_04900 ();
      sub_05014 ();
      sub_047B4 ();
    }
    else
    {
      var4 = *((int *) 0x00047170);
      if (var4 == 0x00000002)
      {
        sub_04900 ();
        sub_05274 ();
      }
      else
      {
        if (var4 == 0x00000003)
        {
          sub_04900 ();
          sub_05414 ();
        }
        else
        {
          var5 = *((int *) 0x000471C0);
          if ((var5 & 0x00000002) == 0x00000000)
            goto label17;
        }
      }
    }
    sub_049AC (0x00047184);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
    if (!(((arg1 < 0x00000002)) != 0x00000000))
    {
      if (arg1 == 0x00000002)
      {
        vsh_BB96E0C6 ();
        ra = ((int *) sp)[0];
      }
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00004B1C
 */
void sub_04B1C (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[15] = ra;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  *((int *) 0x00047160) = arg1;
  var3 = scePaf_4E87FDFC (arg1, 0x00000001);
  var4 = var3;
  if (!(var3 == 0x00000000))
  {
    var5 = ((int *) var3)[1];
    var8 var9 = (*var5) (0x00004A30);
  }
  var10 = *((int *) 0x00047174);
  ((int *) sp)[0] = var10;
  ((int *) sp)[4] = var10;
  while (1) {
    var11 = *((int *) 0x00047178);
    var12 = *((int *) 0x00047174);
    var13 = ((int *) sp)[0];
    var14 = var12 + (var11 << 0x00000002);
    ((int *) sp)[4] = var14;
    if (var13 == var14)
      break;
    var15 = ((int *) sp)[0];
    if (!(var4 == 0x00000000))
    {
      var16 = ((int *) var4)[0];
      var17 = ((int *) var13)[0];
      var20 var21 = (*var16) (var17);
      var15 = ((int *) sp)[0];
    }
    ((int *) sp)[0] = (var15 + 0x00000004);
    ((int *) sp)[8] = var15;
    continue;
  }
  sub_31A9C (0x00047174);
  ra = ((int *) sp)[15];
  var24 = ((int *) sp)[14];
  var25 = ((int *) sp)[13];
  var26 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00004BD0
 */
void sub_04BD0 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = ra;
  var1 = sp;
  sceVshCommonUtil_D87E8E2D (var1, "/CONFIG/SYSTEM/XMB");
  var4 = sp;
  var5 = sp + 0x00000020;
  var8 = sceVshCommonUtil_7A73DC84 (var4, "language", var5);
  var9 = ((int *) sp)[8];
  var10 = (var8) ? 0x00000000 : var9;
  ((int *) sp)[8] = var10;
  if (!(((var10 < 0x0000000C)) != 0x00000000))
  {
    ((int *) sp)[8] = 0x00000001;
  }
  var13 = scePaf_2338483F ();
  var14 = ((int *) sp)[8];
  scePaf_AEC1EE76 (var13, var14);
  var17 = sp;
  sceVshCommonUtil_625A9A5D (var17);
  var20 = sp;
  sceVshCommonUtil_D87E8E2D (var20, "/CONFIG/SYSTEM/CHARACTER_SET");
  var23 = sp;
  var24 = sp + 0x00000024;
  var27 = sceVshCommonUtil_7A73DC84 (var23, 0x00037D28, var24);
  if (var27 == 0x00000000)
  {
  }
  else
  {
    ((int *) sp)[9] = 0x0000000D;
  }
  var28 = ((int *) sp)[9];
  vsh_9BB1BFE6 (var28);
  var31 = sp;
  sceVshCommonUtil_625A9A5D (var31);
  var34 = sp;
  sceVshCommonUtil_D87E8E2D (var34, "/CONFIG/DATE");
  var37 = sp;
  var38 = sp + 0x00000028;
  var41 = sceVshCommonUtil_7A73DC84 (var37, "date_format", var38);
  var42 = ((int *) sp)[10];
  var43 = (var41) ? 0x00000000 : var42;
  var44 = sp;
  var45 = sp + 0x0000002C;
  ((int *) sp)[10] = (!(((var43 < 0x00000003))) ? 0x00000000 : var43);
  var48 = sceVshCommonUtil_7A73DC84 (var44, "time_format", var45);
  var49 = ((int *) sp)[11];
  var50 = (var48) ? 0x00000000 : var49;
  ((int *) sp)[11] = var50;
  if (!(((var50 < 0x00000002)) != 0x00000000))
  {
    ((int *) sp)[11] = 0x00000000;
  }
  var51 = ((int *) sp)[10];
  sceVshCommonUtil_FEC4598F (var51, 0x00000000);
  var54 = sp;
  sceVshCommonUtil_625A9A5D (var54);
  var57 = sp;
  sceVshCommonUtil_D87E8E2D (var57, "/CONFIG/SYSTEM/SOUND");
  var60 = sp;
  var61 = sp + 0x00000030;
  var64 = sceVshCommonUtil_7A73DC84 (var60, "operation_sound_mode", var61);
  if (var64 == 0x00000000)
  {
  }
  else
  {
    ((int *) sp)[12] = 0x00000001;
  }
  var67 = scePaf_2338483F ();
  var68 = ((int *) sp)[12];
  var69 = sp;
  ((char *) var67)[148] = ((0x00000000 < var68));
  sceVshCommonUtil_625A9A5D (var69);
  ra = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00004D58
 */
void sub_04D58 ()
{
  return;
}

/**
 * Subroutine at address 0x00004D60
 */
void sub_04D60 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  vsh_C20DA1FE ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00004D80
 */
void sub_04D80 ()
{
  return;
}

/**
 * Subroutine at address 0x00004D88
 */
void sub_04D88 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[54] = s6;
  var1 = *((int *) 0x000471C0);
  ((int *) sp)[56] = fp;
  var2 = arg2;
  ((int *) sp)[55] = s7;
  var3 = arg1;
  ((int *) sp)[57] = ra;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  ((int *) sp)[49] = s1;
  ((int *) sp)[48] = s0;
  if ((var1 & 0x00000008) == 0x00000000)
  {
    var13 = sp;
    scePaf_5A693901 (var13);
    var16 = sp;
    sub_318F0 (var16, "system_plugin");
    var19 = sp + 0x0000000C;
    sub_318F0 (var19, "__main__");
    var22 = sp + 0x00000028;
    ((int *) sp)[6] = 0x0002B53C;
    var23 = sp + 0x00000070;
    ((int *) sp)[9] = 0x0002B944;
    sub_318F0 (var22, "flash0:/vsh/resource/system_plugin.rco");
    var26 = sp + 0x00000044;
    ((int *) sp)[28] = 0x00000000;
    var27 = sp + 0x00000098;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var23, "main_module");
    var32 = sub_31824 (var26, var23);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var32)[0] = 0x00000000;
    ((int *) var32)[1] = 0x00000000;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var32 + 0x00000008), var27);
    sub_317D8 (var27);
    sub_317D8 (var23);
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var23, "color_mode");
    var43 = sub_31824 (var26, var23);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = var3;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var43)[0] = 0x00000000;
    ((int *) var43)[1] = var3;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var43 + 0x00000008), var27);
    sub_317D8 (var27);
    sub_317D8 (var23);
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var23, "system_color");
    var54 = sub_31824 (var26, var23);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = var2;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var54)[0] = 0x00000000;
    ((int *) var54)[1] = var2;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var54 + 0x00000008), var27);
    sub_317D8 (var27);
    sub_317D8 (var23);
    var61 = sp;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_36C437F1 (var61, 0x00004FC4);
    var64 = sp + 0x00000050;
    var65 = *((int *) 0x000471C0);
    *((int *) 0x000471C0) = (var65 | 0x00000008);
    sub_317D8 (var64);
    sub_31808 (var26);
    sub_317D8 (var22);
    sub_317D8 (var19);
    var74 = sp;
    sub_317D8 (var74);
    ra = ((int *) sp)[57];
  }
  else
  {
    ra = ((int *) sp)[57];
  }
  var4 = ((int *) sp)[56];
  var5 = ((int *) sp)[55];
  var6 = ((int *) sp)[54];
  var7 = ((int *) sp)[53];
  var8 = ((int *) sp)[52];
  var9 = ((int *) sp)[51];
  var10 = ((int *) sp)[50];
  var11 = ((int *) sp)[49];
  var12 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x00004FC4
 */
void sub_04FC4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  *((int *) 0x00047164) = arg1;
  ((int *) sp)[0] = ra;
  sub_049AC (0x000471A4);
  var3 = *((int *) 0x00047170);
  if (var3 == 0x00000001)
  {
    sub_05014 ();
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005014
 */
void sub_05014 ()
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[49] = s1;
  var1 = *((unsigned char *) 0x000471C0);
  ((int *) sp)[55] = ra;
  ((int *) sp)[54] = s6;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  ((int *) sp)[48] = s0;
  if (((var1 ^ 0x00000001) & 0x00000001) == 0x00000000)
  {

  label35:
    ra = ((int *) sp)[55];
  }
  else
  {
    var2 = *((int *) 0x000471C0);
    var3 = sp;
    var4 = sp + 0x0000000C;
    var5 = sp + 0x00000028;
    var6 = sp + 0x00000070;
    var7 = sp + 0x00000044;
    var8 = sp + 0x00000098;
    if (!((var2 & 0x00000010) == 0x00000000))
      goto label35;
    scePaf_5A693901 (var3);
    var18 = sp;
    sub_318F0 (var18, "topmenu_plugin");
    sub_318F0 (var4, "__main__");
    ((int *) sp)[6] = 0x00019CCC;
    ((int *) sp)[7] = 0x00019D7C;
    ((int *) sp)[9] = 0x00019DFC;
    sub_318F0 (var5, "flash0:/vsh/resource/topmenu_plugin.rco");
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[14] = 0x00000032;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var6, "action");
    var29 = sub_31824 (var7, var6);
    ((int *) sp)[37] = 0x00000001;
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var29)[0] = 0x00000000;
    ((int *) var29)[1] = 0x00000001;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var29 + 0x00000008), var8);
    sub_317D8 (var8);
    sub_317D8 (var6);
    var36 = sp;
    scePaf_36C437F1 (var36, 0x00005210);
    var39 = *((int *) 0x000471C0);
    var40 = sp + 0x00000050;
    *((int *) 0x000471C0) = (var39 | 0x00000010);
    sub_317D8 (var40);
    sub_31808 (var7);
    sub_317D8 (var5);
    sub_317D8 (var4);
    var49 = sp;
    sub_317D8 (var49);
    ra = ((int *) sp)[55];
  }
  var9 = ((int *) sp)[54];
  var10 = ((int *) sp)[53];
  var11 = ((int *) sp)[52];
  var12 = ((int *) sp)[51];
  var13 = ((int *) sp)[50];
  var14 = ((int *) sp)[49];
  var15 = ((int *) sp)[48];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x000051B0
 */
void sub_051B0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = *((int *) 0x00047160);
  ((int *) sp)[0] = arg1;
  if (var1 == 0x00000000)
  {
    var11 = sp;
    sub_31AF0 (0x00047174, var11);
    ra = ((int *) sp)[4];
  }
  else
  {
    var4 = scePaf_4E87FDFC (var1, 0x00000001);
    ra = ((int *) sp)[4];
    if (!(var4 == 0x00000000))
    {
      var5 = ((int *) var4)[0];
      var6 = ((int *) sp)[0];
      var9 var10 = (*var5) (var6);
      ra = ((int *) sp)[4];
    }
  }
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00005210
 */
void sub_05210 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  *((int *) 0x0004716C) = arg1;
  ((int *) sp)[0] = ra;
  sub_055EC ();
  sub_049AC (0x00047194);
  var5 = *((int *) 0x00047170);
  if (var5 == 0x00000001)
  {
    sub_0486C ();
    sub_04900 ();
    sub_047B4 ();
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005274
 */
void sub_05274 ()
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[49] = s1;
  var1 = sp;
  var2 = *((int *) 0x000471C0);
  ((int *) sp)[56] = fp;
  var3 = sp + 0x0000000C;
  ((int *) sp)[55] = s7;
  var4 = sp + 0x00000028;
  ((int *) sp)[54] = s6;
  var5 = sp + 0x00000044;
  ((int *) sp)[53] = s5;
  var6 = sp + 0x00000050;
  ((int *) sp)[52] = s4;
  var7 = sp + 0x00000098;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  var8 = sp + 0x00000070;
  ((int *) sp)[57] = ra;
  ((int *) sp)[48] = s0;
  if ((var2 & 0x00000021) == 0x00000000)
  {
    scePaf_5A693901 (var1);
    var20 = sp;
    sub_318F0 (var20, "sysconf_plugin");
    sub_318F0 (var3, "__main__");
    sub_318F0 (var4, "flash0:/vsh/resource/sysconf_plugin.rco");
    ((int *) sp)[14] = 0x00000031;
    ((int *) sp)[15] = 0x000C0000;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var8, "init");
    var31 = sub_31824 (var5, var8);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = 0x00000001;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var31)[0] = 0x00000000;
    ((int *) var31)[1] = 0x00000001;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var31 + 0x00000008), var7);
    sub_317D8 (var7);
    sub_317D8 (var8);
    sub_318F0 (var6, "flash0:/vsh/module/sysconf_plugin.prx");
    var40 = sp;
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[24] = 0x00000003;
    ((int *) sp)[23] = 0x00000001;
    scePaf_36C437F1 (var40, 0x000055B0);
    var43 = *((int *) 0x000471C0);
    *((int *) 0x000471C0) = (var43 | 0x00000020);
    sub_317D8 (var6);
    sub_31808 (var5);
    sub_317D8 (var4);
    sub_317D8 (var3);
    var52 = sp;
    sub_317D8 (var52);
    ra = ((int *) sp)[57];
  }
  else
  {
    ra = ((int *) sp)[57];
  }
  var9 = ((int *) sp)[56];
  var10 = ((int *) sp)[55];
  var11 = ((int *) sp)[54];
  var12 = ((int *) sp)[53];
  var13 = ((int *) sp)[52];
  var14 = ((int *) sp)[51];
  var15 = ((int *) sp)[50];
  var16 = ((int *) sp)[49];
  var17 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x00005414
 */
void sub_05414 ()
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[49] = s1;
  var1 = sp;
  var2 = *((int *) 0x000471C0);
  ((int *) sp)[55] = s7;
  var3 = sp + 0x0000000C;
  ((int *) sp)[54] = s6;
  var4 = sp + 0x00000028;
  ((int *) sp)[53] = s5;
  var5 = sp + 0x00000044;
  ((int *) sp)[52] = s4;
  var6 = sp + 0x00000050;
  ((int *) sp)[51] = s3;
  var7 = sp + 0x00000098;
  ((int *) sp)[50] = s2;
  var8 = sp + 0x00000070;
  ((int *) sp)[56] = ra;
  ((int *) sp)[48] = s0;
  if ((var2 & 0x00000021) == 0x00000000)
  {
    scePaf_5A693901 (var1);
    var19 = sp;
    sub_318F0 (var19, "sysconf_plugin");
    sub_318F0 (var3, "__main__");
    sub_318F0 (var4, "flash0:/vsh/resource/sysconf_plugin.rco");
    ((int *) sp)[14] = 0x00000031;
    ((int *) sp)[15] = 0x000C0000;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_318F0 (var8, "init");
    var30 = sub_31824 (var5, var8);
    ((int *) sp)[37] = 0x00000002;
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var30)[0] = 0x00000000;
    ((int *) var30)[1] = 0x00000002;
    ((int *) sp)[38] = 0x00000000;
    sub_31940 ((var30 + 0x00000008), var7);
    sub_317D8 (var7);
    sub_317D8 (var8);
    sub_318F0 (var6, "flash0:/vsh/module/sysconf_plugin.prx");
    var39 = sp;
    ((int *) sp)[23] = 0x00000001;
    ((int *) sp)[24] = 0x00000003;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_36C437F1 (var39, 0x000055B0);
    var42 = *((int *) 0x000471C0);
    *((int *) 0x000471C0) = (var42 | 0x00000020);
    sub_317D8 (var6);
    sub_31808 (var5);
    sub_317D8 (var4);
    sub_317D8 (var3);
    var51 = sp;
    sub_317D8 (var51);
    ra = ((int *) sp)[56];
  }
  else
  {
    ra = ((int *) sp)[56];
  }
  var9 = ((int *) sp)[55];
  var10 = ((int *) sp)[54];
  var11 = ((int *) sp)[53];
  var12 = ((int *) sp)[52];
  var13 = ((int *) sp)[51];
  var14 = ((int *) sp)[50];
  var15 = ((int *) sp)[49];
  var16 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x000055B0
 */
void sub_055B0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = scePaf_4E87FDFC (arg1, 0x00000001);
  if (!(var3 == 0x00000000))
  {
    var4 = ((int *) var3)[1];
    var7 var8 = (*var4) (0x00005918);
  }
  sub_055EC ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000055EC
 */
void sub_055EC ()
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[28] = s0;
  var1 = sp;
  var2 = *((int *) 0x000471C0);
  ((int *) sp)[31] = s3;
  var3 = sp + 0x0000000C;
  ((int *) sp)[30] = s2;
  var4 = sp + 0x00000028;
  ((int *) sp)[29] = s1;
  var5 = sp + 0x00000050;
  ((int *) sp)[32] = ra;
  if ((var2 & 0x00000041) == 0x00000000)
  {
    scePaf_5A693901 (var1);
    var12 = sp;
    sub_318F0 (var12, "impose_plugin");
    sub_318F0 (var3, "__main__");
    ((int *) sp)[15] = 0x0002C000;
    ((int *) sp)[14] = 0x00000000;
    sub_318F0 (var4, "flash0:/vsh/resource/impose_plugin.rco");
    sub_318F0 (var5, "flash0:/vsh/module/impose_plugin.prx");
    var21 = sp;
    ((int *) sp)[24] = 0x00000001;
    ((int *) sp)[23] = 0x00000001;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_36C437F1 (var21, 0x00000000);
    var24 = *((int *) 0x000471C0);
    *((int *) 0x000471C0) = (var24 | 0x00000040);
    sub_317D8 (var5);
    var27 = sp + 0x00000044;
    sub_31808 (var27);
    sub_317D8 (var4);
    sub_317D8 (var3);
    var34 = sp;
    sub_317D8 (var34);
    ra = ((int *) sp)[32];
  }
  else
  {
    ra = ((int *) sp)[32];
  }
  var6 = ((int *) sp)[31];
  var7 = ((int *) sp)[30];
  var8 = ((int *) sp)[29];
  var9 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x000056F4
 */
void sub_056F4 ()
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[28] = s0;
  var1 = sp;
  var2 = *((int *) 0x000471C0);
  ((int *) sp)[31] = s3;
  var3 = sp + 0x0000000C;
  ((int *) sp)[30] = s2;
  var4 = sp + 0x00000028;
  ((int *) sp)[29] = s1;
  var5 = sp + 0x00000050;
  ((int *) sp)[32] = ra;
  if ((var2 & 0x00000080) == 0x00000000)
  {
    scePaf_5A693901 (var1);
    var12 = sp;
    sub_318F0 (var12, "auth_plugin");
    sub_318F0 (var3, "__main__");
    sub_318F0 (var4, "flash0:/vsh/resource/auth_plugin.rco");
    ((int *) sp)[14] = 0x00000030;
    sub_318F0 (var5, "flash0:/vsh/module/auth_plugin.prx");
    var21 = sp;
    ((int *) sp)[24] = 0x00000001;
    ((int *) sp)[23] = 0x00000001;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_36C437F1 (var21, 0x000057F8);
    var24 = *((int *) 0x000471C0);
    *((int *) 0x000471C0) = (var24 | 0x00000080);
    sub_317D8 (var5);
    var27 = sp + 0x00000044;
    sub_31808 (var27);
    sub_317D8 (var4);
    sub_317D8 (var3);
    var34 = sp;
    sub_317D8 (var34);
    ra = ((int *) sp)[32];
  }
  else
  {
    ra = ((int *) sp)[32];
  }
  var6 = ((int *) sp)[31];
  var7 = ((int *) sp)[30];
  var8 = ((int *) sp)[29];
  var9 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x000057F8
 */
void sub_057F8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_4E87FDFC (arg1, 0x00000001);
  if (var3 == 0x00000000)
  {

  label12:
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = ((int *) var3)[3];
    var7 var8 = (*var4) (0x00000010, 0x00005868, 0x00000000, 0x00000000);
    var11 = sub_2DA58 ();
    var12 = *((int *) 0x000471C8);
    ra = ((int *) sp)[1];
    if (!(var12 == var11))
    {
      var13 = ((int *) var3)[4];
      var16 var17 = (*var13) (var12);
      goto label12;
    }
  }
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005868
 */
void sub_05868 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (arg1 != 0x00000000)
  {
    sub_04858 (0x00000003, 0x00000005);

  label18:
    sub_05014 ();
    sub_0486C ();
    sub_04900 ();
    sub_047B4 ();
    ra = ((int *) sp)[0];
  }
  else
  {
    var3 = sub_2DA58 ();
    var4 = *((int *) 0x000471C8);
    if (!(var4 == var3))
      goto label18;
    var15 = sub_2DA4C ();
    if ((var15 & 0x00000100) == 0x00000000)
      goto label18;
    var18 = sceUmdUser_87533940 ();
    if (var18 != 0x00000000)
      goto label18;
    var19 = *((int *) 0x000471C0);
    *((int *) 0x000471C0) = ((var19 & 0xFFFFFFFB) | (0x00000000 & 0x00000001));
    sub_044BC (0x00000002, 0x00000000);
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005918
 */
void sub_05918 ()
{
  sp = sp + 0xFFFFFFC0;
  var1 = sp;
  ((int *) sp)[12] = ra;
  ((int *) sp)[8] = 0x00000001;
  ((int *) sp)[9] = 0x00000000;
  sceVshCommonUtil_D87E8E2D (var1, "/CONFIG/SYSTEM/XMB/THEME");
  var4 = sp;
  var5 = sp + 0x00000020;
  var8 = sceVshCommonUtil_7A73DC84 (var4, "color_mode", var5);
  var9 = ((int *) sp)[8];
  var10 = sp + 0x00000024;
  var11 = sp;
  ((int *) sp)[8] = ((var8) ? 0x00000000 : var9);
  var14 = sceVshCommonUtil_7A73DC84 (var11, "system_color", var10);
  var15 = *((int *) 0x00047164);
  var16 = ((int *) sp)[9];
  ((int *) sp)[9] = ((var14) ? 0x00000000 : var16);
  if (var15 != 0x00000000)
  {
    var28 = scePaf_4E87FDFC (var15, 0x00000001);
    var29 = var28;
    if (!(var28 == 0x00000000))
    {
      var30 = ((int *) sp)[8];
      if (var30 != 0x00000000)
      {
        var36 = ((int *) var29)[1];
        var37 = ((int *) sp)[9];
        var40 var41 = (*var36) (var37);
      }
      else
      {
        var31 = ((int *) var29)[0];
        var34 var35 = (*var31) ();
      }
    }
  }
  sub_0486C ();
  sub_05014 ();
  sub_047B4 ();
  var23 = sp;
  sceVshCommonUtil_625A9A5D (var23);
  ra = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00005A04
 */
void sub_05A04 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_0E734 ();
  var4 = *((int *) 0x000471CC);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005A30
 */
void sub_05A30 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  if (((arg4 < 0x0000000A)) == 0x00000000)
  {
  case 6:
  case 7:
  case 8:

  label25:
    ra = ((int *) sp)[4];
  }
  else
  {
    var1 = ((int *) ((arg4 << 0x00000002) + 0x00041E1C))[0];
    switch () {
    case 0:
      var4 = sceUmdUser_87533940 ();
      if (var4 != 0x00000000)
      {
      case 1:

      label19:
        sub_051B0 (0x00000008);
        ra = ((int *) sp)[4];
      }
      else
      {
        sub_051B0 (0x00000004);
        var7 = *((int *) 0x000471C0);
        *((int *) 0x000471C0) = (var7 | 0x00000001);
        goto label25;
      }
    goto label19;
    case 2:
    case 3:
    case 4:
    case 9:
      sub_04858 (0x00000003, arg4);
      goto label19;
    case 5:
      var12 = *((int *) 0x000471C0);
      *((int *) 0x000471C0) = (var12 | 0x00000002);
      sub_051B0 (0x00000040);
      var15 = *((int *) 0x000471BC);
      if (var15 == 0x00000001)
      {
        sub_056F4 ();
        ra = ((int *) sp)[4];
      }
      else
      {
        var16 = sp;
        ((int *) sp)[0] = 0x000056F4;
        sub_319D4 (0x00047184, var16);
        ra = ((int *) sp)[4];
      }
    goto label25;
    goto label25;
    goto label25;
    }
  }
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00005B10
 */
void sub_05B10 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[17] = s1;
  *((int *) 0x000471C0) = 0x00000000;
  ((int *) sp)[19] = s3;
  ((int *) sp)[20] = ra;
  ((int *) sp)[18] = s2;
  ((int *) sp)[16] = s0;
  *((int *) 0x00047170) = arg1;
  if (arg1 == 0x00000001)
  {
    sub_04858 (arg1, 0x00000000);
  }
  var3 = sub_0D464 (0x00000000);
  var4 = ((int *) var3)[3];
  var5 = var3;
  if (var4 == 0x80020327)
  {
    vsh_E5463CE5 (0x00000001);
    var4 = ((int *) var5)[3];
  }
  if (var4 < 0)
  {

  label14:
    sub_04858 (0x00000004, var4);
    var6 = *((int *) 0x00047170);
  }
  else
  {
    var4 = ((int *) var5)[2];
    if (var4 < 0)
      goto label14;
    var6 = *((int *) 0x00047170);
  }
  ((int *) sp)[12] = 0x00000001;
  var7 = 0x00000000;
  var8 = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  if (!(var6 == 0x00000002))
  {
    var9 = sp;
    sceVshCommonUtil_D87E8E2D (var9, "/CONFIG/SYSTEM/XMB/THEME");
    var12 = sp;
    var13 = sp + 0x00000030;
    var16 = sceVshCommonUtil_7A73DC84 (var12, "color_mode", var13);
    var17 = ((int *) sp)[12];
    var18 = sp;
    var19 = sp + 0x00000034;
    ((int *) sp)[12] = ((var16) ? 0x00000000 : var17);
    var22 = sceVshCommonUtil_7A73DC84 (var18, "system_color", var19);
    var23 = ((int *) sp)[13];
    var24 = (var22) ? 0x00000000 : var23;
    var25 = ((int *) sp)[12];
    ((int *) sp)[13] = var24;
    var7 = var24;
    if (var25 == 0x00000000)
    {
      var68 = sp + 0x00000020;
      scePaf_BC8DC92B (var68);
      var71 = ((unsigned short *) sp)[17];
      var7 = var71 + 0xFFFFFFFF;
    }
    var26 = sp;
    var27 = sp + 0x00000038;
    ((int *) sp)[14] = 0x00000000;
    var30 = sceVshCommonUtil_7A73DC84 (var26, "wallpaper_mode", var27);
    var31 = ((int *) sp)[14];
    var32 = sp;
    var33 = (var30) ? 0x00000000 : var31;
    ((int *) sp)[14] = var33;
    var8 = (0x00000000 < var33);
    sceVshCommonUtil_625A9A5D (var32);
  }
  var36 = sp;
  sceVshCommonUtil_D87E8E2D (var36, "/CONFIG/SYSTEM");
  var39 = sp;
  var42 = sceVshCommonUtil_7A73DC84 (var39, "umd_autoboot", 0x000471CC);
  if (var42 == 0x00000000)
  {
  }
  else
  {
    *((int *) 0x000471CC) = 0x00000001;
  }
  var43 = sp;
  sceVshCommonUtil_625A9A5D (var43);
  var46 = *((int *) 0x000471CC);
  if (!(var46 == 0x00000000))
  {
    *((int *) 0x000471CC) = (!((arg2 & 0x000000FF)) ? var46 : 0x00000000);
  }
  sub_044BC (var8, var7);
  var51 = scePaf_AB9A6186 (0x00000000, 0x00004BD0, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00004D58);
  var54 = scePaf_AB9A6186 (0x00000000, 0x00004D60, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00004D80);
  var55 = ((int *) sp)[12];
  var56 = ((int *) sp)[13];
  sub_04D88 (var55, var56);
  var61 = sceVshBridge_2EB0812A ();
  if (((var61 < 0x00000003)) == 0x00000000)
  {
    sub_05D64 (0x00000000);
    ra = ((int *) sp)[20];
  }
  else
  {
    ra = ((int *) sp)[20];
  }
  var62 = ((int *) sp)[19];
  var63 = ((int *) sp)[18];
  var64 = ((int *) sp)[17];
  var65 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00005D64
 */
void sub_05D64 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = sub_2DA58 ();
  var5 = *((int *) 0x00047170);
  *((int *) 0x000471C8) = var4;
  if (var5 == 0x00000002)
  {
    var6 = 0x00000010;
    if ((var1 & 0x000000F0) != 0x00000010)
    {

    label23:
      sub_051B0 (var6);
      ra = ((int *) sp)[1];
    }
    else
    {
      var18 = sub_2E020 ();
      var6 = 0x00000010;
      if ((((var18 + 0xFFFFFFFF) < 0x00000002)) == 0x00000000)
        goto label23;

    label27:
      var10 = scePaf_AB9A6186 (0x00000000, 0x00005A04, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00005A30);

    label29:
      ra = ((int *) sp)[1];
    }
  }
  else
  {
    var6 = 0x00000020;
    if (var5 == 0x00000003)
      goto label23;
    if (var5 == 0x00000001)
    {
      goto label29;
    }
    else
    {
      var7 = 0x00000002;
      if ((var1 & 0x00000002) != 0x00000000)
      {

      label19:
        sub_04858 (0x00000002, var7);
        var6 = 0x00000008;
        goto label23;
      }
      else
      {
        if ((var1 & 0x00000004) != 0x00000000)
        {
          var7 = 0x00000004;
          goto label19;
        }
        else
        {
          var7 = 0x00000008;
          if ((var1 & 0x00000008) != 0x00000000)
            goto label19;
          var6 = 0x00000008;
          if ((var1 & 0x00000100) == 0x00000000)
            goto label23;
          goto label27;
        }
      }
    }
  }
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005E64
 */
void sub_05E64 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  ((int *) sp)[8] = s0;
  var2 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[10] = s2;
  var3 = sp;
  var4 = sp + 0x00000010;
  ((int *) sp)[11] = ra;
  if ((var2 & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    sub_32288 (0x00047174);
    sub_32298 (0x00047184);
    sub_32298 (0x00047194);
    sub_32298 (0x000471A4);
    var5 = (var1 < 0x00000001);
  }
  else
  {
    var5 = (var1 < 0x00000001);
  }
  if ((var2 & var5) != 0x00000000)
  {
    sub_322A8 (0x000471A4);
    sub_322A8 (0x00047194);
    sub_322A8 (0x00047184);
    sub_322E8 (0x00047174);
    ra = ((int *) sp)[11];
  }
  else
  {
    ra = ((int *) sp)[11];
  }
  var6 = ((int *) sp)[10];
  var7 = ((int *) sp)[9];
  var8 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00005F48
 */
void sub_05F48 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  var2 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[6] = s2;
  ((int *) sp)[7] = ra;
  if ((var2 & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    sub_33200 (0x00047680);
    var13 = sp;
    sub_33254 (0x000476A4);
    var3 = (var1 < 0x00000001);
  }
  else
  {
    var3 = (var1 < 0x00000001);
  }
  if ((var2 & var3) != 0x00000000)
  {
    sub_332C8 (0x000476A4);
    *((int *) 0x00047680) = 0x00045428;
    ThreadManForUser_60107536 (0x00047684);
    *((int *) 0x00047680) = 0x00045440;
  }
  ra = ((int *) sp)[7];
  var4 = ((int *) sp)[6];
  var5 = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00005FFC
 */
void sub_05FFC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if ((var1 & (((arg1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    var10 = SysMemUserForUser_ACBD88CA ();
    sub_2EDF4 (0x00047AD4, ((((0x023FFFFF < var10))) ? 0x00C00000 : 0x00800000));
    var3 = (var2 < 0x00000001);
  }
  else
  {
    var3 = (var2 < 0x00000001);
  }
  if ((var1 & var3) != 0x00000000)
  {
    sub_2EE48 (0x00047AD4);
    ra = ((int *) sp)[2];
  }
  else
  {
    ra = ((int *) sp)[2];
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006094
 */
void sub_06094 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  var1 = arg2 ^ 0x0000FFFF;
  ((int *) sp)[3] = s3;
  var2 = arg1 ^ 0x00000001;
  ((int *) sp)[5] = s5;
  var3 = arg1;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s6;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (!((((var1 < 0x00000001)) & ((var2 < 0x00000001))) == 0x00000000))
  {
    var4 = 0x00048020;
    var5 = 0x00000007;
    while (1) {
      var5 = var5 + 0xFFFFFFFF;
      sub_255D4 (var4);
      var4 = var4 + 0x00000058;
      if (var5 != 0xFFFFFFFF)
        continue;
      break;
    }
  }
  var8 = (var2 < 0x00000001);
  if ((((var1 < 0x00000001)) & var8) == 0x00000000)
  {
    var13 = (var1 < 0x00000001);
  }
  else
  {
    var9 = 0x000482E0;
    var10 = 0x0000000A;
    while (1) {
      var10 = var10 + 0xFFFFFFFF;
      sub_255D4 (var9);
      var9 = var9 + 0x00000058;
      if (var10 != 0xFFFFFFFF)
        continue;
      break;
    }
    var13 = (var1 < 0x00000001);
    var8 = (var2 < 0x00000001);
  }
  var14 = (var2 < 0x00000001);
  if (!((var13 & var8) == 0x00000000))
  {
    var15 = 0x000486A8;
    var16 = 0x0000000C;
    while (1) {
      var16 = var16 + 0xFFFFFFFF;
      sub_255D4 (var15);
      var15 = var15 + 0x00000058;
      if (var16 != 0xFFFFFFFF)
        continue;
      break;
    }
    var14 = (var2 < 0x00000001);
  }
  var19 = (var3 < 0x00000001);
  if (!((((var1 < 0x00000001)) & var14) == 0x00000000))
  {
    var20 = 0x00048B20;
    var21 = 0x00000009;
    while (1) {
      var21 = var21 + 0xFFFFFFFF;
      sub_255D4 (var20);
      var20 = var20 + 0x00000058;
      if (var21 != 0xFFFFFFFF)
        continue;
      break;
    }
    var19 = (var3 < 0x00000001);
  }
  if ((((var1 < 0x00000001)) & var19) == 0x00000000)
  {
    var36 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x00048B20 == 0x00000000))
    {
      var24 = 0x00048E90;

      label30:
      while (1) {
        var25 = var24 + 0xFFFFFFA8;
        if (var24 == 0x00048B20)
          break;
        var24 = var25;
        if (var25 == 0xFFFFFFFC)
          continue;
        var26 = var25 + 0x00000058;
        while (1) {
          if ((var25 + 0x00000004) == var26)
            break;
          var26 = var26 + 0xFFFFFFE4;
          var27 = ((int *) var26)[6];
          if (var27 == 0x00000000)
            continue;
          var28 = ((int *) var27)[1];
          var29 = var28 + 0xFFFFFFFF;
          ((int *) var27)[1] = var29;
          if (var29 > 0)
            continue;
          var30 = ((int *) var27)[0];
          var31 = ((int *) var30)[1];
          var34 var35 = (*var31) (var27);
          continue;
        }
        goto label30;
      }
    }
    var36 = (var1 < 0x00000001);
  }
  if ((var36 & var19) == 0x00000000)
  {
    var49 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x000486A8 == 0x00000000))
    {
      var37 = 0x00048B20;
      while (1) {
        var38 = var37 + 0xFFFFFFA8;
        if (var37 == 0x000486A8)
          break;
        var37 = var38;
        if (var38 == 0xFFFFFFFC)
          continue;
        var39 = var38 + 0x00000058;
        while (1) {
          if ((var38 + 0x00000004) == var39)
            break;
          var39 = var39 + 0xFFFFFFE4;
          var40 = ((int *) var39)[6];
          if (var40 == 0x00000000)
            continue;
          var41 = ((int *) var40)[1];
          var42 = var41 + 0xFFFFFFFF;
          ((int *) var40)[1] = var42;
          if (var42 > 0)
            continue;
          var43 = ((int *) var40)[0];
          var44 = ((int *) var43)[1];
          var47 var48 = (*var44) (var40);
          continue;
        }
        continue;
      }
    }
    var49 = (var1 < 0x00000001);
  }
  if ((var49 & var19) == 0x00000000)
  {
    var62 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x000482E0 == 0x00000000))
    {
      var50 = 0x000486A8;
      while (1) {
        var51 = var50 + 0xFFFFFFA8;
        if (var50 == 0x000482E0)
          break;
        var50 = var51;
        if (var51 == 0xFFFFFFFC)
          continue;
        var52 = var51 + 0x00000058;
        while (1) {
          if ((var51 + 0x00000004) == var52)
            break;
          var52 = var52 + 0xFFFFFFE4;
          var53 = ((int *) var52)[6];
          if (var53 == 0x00000000)
            continue;
          var54 = ((int *) var53)[1];
          var55 = var54 + 0xFFFFFFFF;
          ((int *) var53)[1] = var55;
          if (var55 > 0)
            continue;
          var56 = ((int *) var53)[0];
          var57 = ((int *) var56)[1];
          var60 var61 = (*var57) (var53);
          continue;
        }
        continue;
      }
    }
    var62 = (var1 < 0x00000001);
  }
  ra = ((int *) sp)[7];
  if (!((var62 & var19) == 0x00000000))
  {
    if (!(0x00048020 == 0x00000000))
    {
      var63 = 0x000482E0;
      while (1) {
        var64 = var63 + 0xFFFFFFA8;
        if (var63 == 0x00048020)
          break;
        var63 = var64;
        if (var64 == 0xFFFFFFFC)
          continue;
        var65 = var64 + 0x00000058;
        while (1) {
          if ((var64 + 0x00000004) == var65)
            break;
          var65 = var65 + 0xFFFFFFE4;
          var66 = ((int *) var65)[6];
          if (var66 == 0x00000000)
            continue;
          var67 = ((int *) var66)[1];
          var68 = var67 + 0xFFFFFFFF;
          ((int *) var66)[1] = var68;
          if (var68 > 0)
            continue;
          var69 = ((int *) var66)[0];
          var70 = ((int *) var69)[1];
          var73 var74 = (*var70) (var66);
          continue;
        }
        continue;
      }
      ra = ((int *) sp)[7];
    }
  }
  var75 = ((int *) sp)[6];
  var76 = ((int *) sp)[5];
  var77 = ((int *) sp)[4];
  var78 = ((int *) sp)[3];
  var79 = ((int *) sp)[2];
  var80 = ((int *) sp)[1];
  var81 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000063C0
 */
void sub_063C0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s3;
  var1 = arg2 ^ 0x0000FFFF;
  ((int *) sp)[4] = s0;
  ((int *) sp)[8] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  if (!((((var1 < 0x00000001)) & (((arg1 ^ 0x00000001) < 0x00000001))) == 0x00000000))
  {
    var2 = 0x00050000;
    var3 = 0x00050000;
    var4 = 0x7FFFFFFF;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x7FFFFFFF));
    var5 = 0x00048FC0;
    var6 = 0x00048FD0;
    __asm__ ("swc1       $fpr00, 12($v1);"
      : 
      : "=r"(0x00048FC0));
    __asm__ ("swc1       $fpr00, 4($v1);"
      : 
      : "=r"(0x00048FC0));
    __asm__ ("swc1       $fpr00, 8($v1);"
      : 
      : "=r"(0x00048FC0));
    *((int *) 0x00048F80) = 0x00000000;
    *((short *) 0x00048F76) = 0x00000000;
    *((short *) 0x00048F78) = 0x00000000;
    *((short *) 0x00048F7A) = 0x00000000;
    *((short *) 0x00048F7C) = 0x00000000;
    *((short *) 0x00048F7E) = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($a2);"
             "swc1       $fpr00, 4($a2);"
             "swc1       $fpr00, 8($a2);"
      : 
      : "=r"(0x00048FD0));
    *((short *) 0x00048F74) = 0x00000000;
    __asm__ ("swc1       $fpr00, -28736($t0);"
      : 
      : "=r"(0x00050000));
    __asm__ ("swc1       $fpr00, -28720($t1);"
      : 
      : "=r"(0x00050000));
    sub_32328 (0x00048FE4, 0x00000000);
    sub_32328 (0x00048FE8, 0x00000000);
    var11 = 0x00048FF4;
    var12 = 0x00000003;
    while (1) {
      var12 = var12 + 0xFFFFFFFF;
      ((int *) var11)[0] = 0x00000000;
      ((int *) var11)[1] = 0x00000000;
      var11 = var11 + 0x0000000C;
      if (var12 != 0xFFFFFFFF)
        continue;
      break;
    }
  }
  var13 = (arg1 < 0x00000001);
  if ((((var1 < 0x00000001)) & var13) == 0x00000000)
  {
    var17 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x00048FF4 == 0x00000000))
    {
      var14 = 0x00049024;
      while (1) {
        if (var14 == 0x00048FF4)
          break;
        var14 = var14 + 0xFFFFFFF4;
        sub_335E8 (var14);
        continue;
      }
    }
    var17 = (var1 < 0x00000001);
  }
  if ((var17 & var13) == 0x00000000)
  {
    var19 = (var1 < 0x00000001);
  }
  else
  {
    var18 = *((int *) 0x00048FE8);
    var19 = (var1 < 0x00000001);
    if (!(var18 == 0x00000000))
    {
      var20 = ((int *) var18)[1];
      var21 = var20 + 0xFFFFFFFF;
      ((int *) var18)[1] = var21;
      if (var21 <= 0)
      {
        var35 = ((int *) var18)[0];
        var36 = ((int *) var35)[1];
        var39 var40 = (*var36) (var18, 0xFFFFFFFF);
        var19 = (var1 < 0x00000001);
      }
      else
      {
        var19 = (var1 < 0x00000001);
      }
    }
  }
  ra = ((int *) sp)[8];
  if ((var19 & var13) == 0x00000000)
  {

  label31:
    var23 = ((int *) sp)[7];
  }
  else
  {
    var22 = *((int *) 0x00048FE4);
    var23 = ((int *) sp)[7];
    if (!(var22 == 0x00000000))
    {
      var24 = ((int *) var22)[1];
      var25 = var24 + 0xFFFFFFFF;
      ((int *) var22)[1] = var25;
      if (var25 <= 0)
      {
        var29 = ((int *) var22)[0];
        var30 = ((int *) var29)[1];
        var33 var34 = (*var30) (var22, 0xFFFFFFFF);
        ra = ((int *) sp)[8];
      }
      else
      {
        ra = ((int *) sp)[8];
      }
      goto label31;
    }
  }
  var26 = ((int *) sp)[6];
  var27 = ((int *) sp)[5];
  var28 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000658C
 */
void sub_0658C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  var2 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[6] = ra;
  if ((var2 & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    scePaf_9F84F158 (0x00049130, "ScePafCriticalSection");
    var12 = sp;
    sub_341E4 (0x00049150);
    var3 = (var1 < 0x00000001);
  }
  else
  {
    var3 = (var1 < 0x00000001);
  }
  if ((var2 & var3) != 0x00000000)
  {
    sub_34220 (0x00049150);
    scePaf_284CAB46 (0x00049130);
    ra = ((int *) sp)[6];
  }
  else
  {
    ra = ((int *) sp)[6];
  }
  var4 = ((int *) sp)[5];
  var5 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00006630
 */
void sub_06630 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_05E64 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006650
 */
void sub_06650 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_05E64 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006670
 */
void vsh_A1536EF3 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0xC3280000));
  ((int *) sp)[7] = s3;
  var2 = arg1 + 0x00000040;
  ((int *) sp)[6] = s2;
  var3 = arg1;
  __asm__ ("swc1       $fpr00, 64($a0);"
    : 
    : "=r"(arg1));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[9] = s5;
  var5 = arg3;
  ((int *) sp)[8] = s4;
  var6 = arg4;
  ((int *) sp)[10] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) arg1)[0] = arg2;
  ((int *) arg1)[9] = arg5;
  __asm__ ("swc1       $fpr00, 12($s3);"
    : 
    : "=r"(var2));
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[3] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  ((int *) arg1)[7] = 0x00000000;
  ((int *) arg1)[8] = 0x00000000;
  ((int *) var3)[10] = arg4;
  ((int *) arg1)[11] = 0x00000000;
  ((char *) arg1)[48] = 0x00000000;
  ((int *) var2)[1] = 0x00000000;
  ((int *) var2)[2] = 0x00000000;
  if (arg4 == 0x00000100)
  {
    var332 = 0xC3280000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC3280000));
    ((int *) sp)[1] = 0x00000000;
  }
  else
  {
    if (arg4 == 0x00001000)
    {
      var331 = 0xC3020000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3020000));
      ((int *) sp)[1] = 0x00000000;
    }
    else
    {
      ((int *) sp)[1] = 0x00000000;
      var7 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
    }
  }
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var8 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  ((int *) sp)[2] = 0x00000000;
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[3];
  var12 = ((int *) sp)[0];
  var13 = ((int *) var3)[1];
  ((int *) var3)[17] = var9;
  ((int *) var3)[16] = var12;
  ((int *) var3)[18] = var10;
  ((int *) var3)[19] = var11;
  if (var13 != 0x00000000)
  {

  label13:
    var21 = ((int *) var13)[0];
    var22 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var23 = sp;
    var24 = ((int *) var21)[23];
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var27 var28 = (*var24) (var13, var23);
    var31 = scePaf_ED055C3C (var13, 0x01000004);
    var32 = ((int *) var3)[1];
    scePaf_07C50769 (var32, var2, 0x00000000);
    var37 = scePaf_ED055C3C (var32, 0x01000001);
  }
  else
  {
    var16 = scePaf_48BB05D5 (0x00000330);
    var17 = ((int *) var3)[0];
    var18 = var16;
    var13 = var16;
    scePaf_71B79831 (var16, var17, 0x00000000);
    ((int *) var3)[1] = var18;
    if (!(var18 == 0x00000000))
      goto label13;
  }
  if (var5 == 0x00000000)
  {
    var267 = ((int *) var3)[2];
    if (var267 != 0x00000000)
    {
      var330 = ((int *) var267)[115];

    label31:
      scePaf_1AA1A452 (var276, var275, 0x00000000, 0x00000010);
      var279 = ((int *) var3)[2];
      var280 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var281 = ((int *) var279)[0];
      __asm__ ("swc1       $fpr00, 4($sp);"
               "swc1       $fpr00, 8($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var282 = ((int *) var281)[21];
      var283 = sp;
      var286 var287 = (*var282) (var279, var283);
      var290 = scePaf_ED055C3C (var279, 0x01000002);
      var291 = ((int *) var3)[2];
      var292 = 0x43F00000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x43F00000), "=r"(sp));
      var293 = 0x43880000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x43880000));
      var294 = ((int *) var291)[0];
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var295 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var296 = sp;
      var297 = ((int *) var294)[23];
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[2] = 0x00000000;
      var300 var301 = (*var297) (var291, var296);
      var304 = scePaf_ED055C3C (var291, 0x01000004);
      var305 = ((int *) var3)[2];
      var306 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var307 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
      scePaf_07C50769 (var305, var307, 0x00000000);
      var312 = scePaf_ED055C3C (var305, 0x01000001);
      var313 = ((int *) var3)[2];
      __asm__ ("mtc1       $zr, $fpr12;");
      var314 = ((int *) var313)[0];
      var315 = ((int *) var314)[22];
      var318 var319 = (*var315) (var313, 0x00000001);
      var322 = scePaf_ED055C3C (var313, 0x01000003);
      var323 = ((int *) var3)[2];
      var324 = ((int *) var323)[0];
      var325 = ((int *) var324)[28];
      var328 var329 = (*var325) (var323, 0x00000019, 0x00000003);
      var84 = var6 ^ 0x00000100;
    }
    else
    {
      var270 = scePaf_48BB05D5 (0x00000330);
      var271 = ((int *) var3)[0];
      var272 = var270;
      scePaf_71B79831 (var270, var271, 0x00000000);
      var275 = var272;
      ((int *) var3)[2] = var272;
      if (var272 == 0x00000000)
      {

      label76:
        var84 = var6 ^ 0x00000100;
      }
      else
      {
        var276 = ((int *) var275)[115];
        goto label31;
      }
    }
  }
  else
  {
    var38 = ((int *) var3)[5];
    if (var38 != 0x00000000)
    {
      var266 = ((int *) var38)[115];

    label60:
      scePaf_1AA1A452 (var47, var46, 0x00000000, 0x00000010);
      var50 = ((int *) var3)[5];
      scePaf_57F4BB8A (var50, var5, 0x00000000);
      var53 = ((int *) var3)[5];
      var54 = 0x43710000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x43710000));
      var55 = sp;
      __asm__ ("swc1       $fpr00, 0($sp);"
        : 
        : "=r"(sp));
      var56 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
      scePaf_07C50769 (var53, var55, 0x00000000);
      var61 = scePaf_ED055C3C (var53, 0x01000001);
      var62 = ((int *) var3)[5];
      var63 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var64 = sp;
      var65 = ((int *) var62)[0];
      __asm__ ("swc1       $fpr00, 4($sp);"
               "swc1       $fpr00, 8($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var66 = ((int *) var65)[21];
      var69 var70 = (*var66) (var62, var64);
      var73 = scePaf_ED055C3C (var62, 0x01000002);
      var74 = ((int *) var3)[5];
      __asm__ ("mtc1       $zr, $fpr12;");
      var75 = ((int *) var74)[0];
      var76 = ((int *) var75)[22];
      var79 var80 = (*var76) (var74, 0x00000001);
      var83 = scePaf_ED055C3C (var74, 0x01000003);
    }
    else
    {
      var41 = scePaf_48BB05D5 (0x00000340);
      var42 = ((int *) var3)[0];
      var43 = var41;
      scePaf_C9D0563D (var41, var42, 0x00000000);
      var46 = var43;
      ((int *) var3)[5] = var43;
      if (!(var43 == 0x00000000))
      {
        var47 = ((int *) var46)[115];
        goto label60;
      }
    }
    goto label76;
  }
  if ((((var84 < 0x00000001)) | (((var6 ^ 0x00001000) < 0x00000001))) == 0x00000000)
  {
    var109 = ((int *) var3)[6];
  }
  else
  {
    var85 = ((int *) var3)[4];
    if (var85 == 0x00000000)
    {
      var261 = scePaf_48BB05D5 (0x00000340);
      var262 = ((int *) var3)[1];
      var263 = var261;
      scePaf_F52058EA (var261, var262, 0x00000000);
      var85 = var263;
      ((int *) var3)[4] = var263;
      if (!(var263 == 0x00000000))
      {
        var86 = ((int *) var3)[10];

      label87:
        if (var86 == 0x00000100)
        {
          var253 = ((int *) var85)[0];
          var254 = ((int *) var253)[28];
          var257 var258 = (*var254) (var85, 0x00000033, 0x0000000A);
        }
        __asm__ ("mtc1       $zr, $fpr12;");
        var87 = ((int *) var3)[4];
        __asm__ ("mov.s      $fpr13, $fpr12;");
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_D4E25D69 (var87);
        var90 = ((int *) var3)[10];
        var91 = ((int *) var3)[4];
        if (var90 == 0x00000100)
        {
          var250 = 0xC3040000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC3040000), "=r"(sp));
          var251 = 0xC1200000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 4($sp);"
            : 
            : "=r"(0xC1200000), "=r"(sp));
          var252 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
        }
        else
        {
          var92 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[0] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[1] = 0x00000000;
          ((int *) sp)[2] = 0x00000000;
        }
        var93 = sp;
        scePaf_07C50769 (var91, var93, 0x00000000);
        var98 = scePaf_ED055C3C (var91, 0x01000001);
        var99 = ((int *) var3)[4];
        __asm__ ("mtc1       $zr, $fpr12;");
        var100 = ((int *) var99)[0];
        var101 = ((int *) var100)[22];
        var104 var105 = (*var101) (var99, 0x00000001);
        var108 = scePaf_ED055C3C (var99, 0x01000003);
      }
    }
    else
    {
      var86 = ((int *) var3)[10];
      goto label87;
    }
    var109 = ((int *) var3)[6];
  }
  if (var109 != 0x00000000)
  {

  label113:
    scePaf_CA38E212 (var114, 0x00080001, 0x00008048, var3);
    var119 = ((int *) var3)[6];
    scePaf_CA38E212 (var119, 0x00080002, 0x00008048, var3);
    var122 = ((int *) var3)[6];
    var123 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var124 = ((int *) var122)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var125 = ((int *) var124)[21];
    var126 = sp;
    var129 var130 = (*var125) (var122, var126);
    var133 = scePaf_ED055C3C (var122, 0x01000002);
    var134 = ((int *) var3)[6];
    var135 = 0x43100000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x43100000), "=r"(sp));
    var136 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42A00000));
    var137 = ((int *) var134)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var138 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var139 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var140 = ((int *) var137)[23];
    ((int *) sp)[2] = 0x00000000;
    var143 var144 = (*var140) (var134, var139);
    var147 = scePaf_ED055C3C (var134, 0x01000004);
    var148 = ((int *) var3)[6];
    scePaf_46B3EE71 (var148, 0x0000FFFF);
    var151 = ((int *) var3)[6];
    scePaf_A366A11A (var151, 0x00000001);
    var154 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var155 = ((int *) var3)[6];
    scePaf_78FCC6CC (var155);
    var158 = ((int *) var3)[6];
    __asm__ ("mtc1       $zr, $fpr12;");
    var159 = ((int *) var158)[0];
    var160 = ((int *) var159)[22];
    var163 var164 = (*var160) (var158, 0x00000001);
    var167 = scePaf_ED055C3C (var158, 0x01000003);
    var168 = ((int *) var3)[6];
    if (var6 == 0x00000100)
    {
      var246 = 0xC3040000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC3040000), "=r"(sp));
      var247 = 0xC1200000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC1200000));
      var248 = sp;
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var249 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[2] = 0x00000000;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
    }
    else
    {
      var169 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[0] = 0x00000000;
      var170 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
    }
    scePaf_07C50769 (var168, var170, 0x00000000);
    var175 = scePaf_ED055C3C (var168, 0x01000001);
  }
  else
  {
    var112 = scePaf_48BB05D5 (0x00000330);
    var113 = ((int *) var3)[1];
    var114 = var112;
    scePaf_A1756BC8 (var112, var113, 0x00000000);
    ((int *) var3)[6] = var114;
    if (!(var114 == 0x00000000))
    {
      goto label113;
    }
  }
  ra = ((int *) sp)[10];
  if (!(var6 == 0x00000000))
  {
    var176 = ((int *) var3)[5];
    if (var176 == 0x00000000)
    {
      var235 = ((int *) var3)[2];
      var177 = ((int *) var3)[3];
      if (var235 == 0x00000000)
      {

      label165:
        if (var177 != 0x00000000)
        {
          var200 = ((int *) var177)[0];
          var201 = 0x439B0000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x439B0000), "=r"(sp));
          var202 = 0x43340000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x43340000));
          var203 = sp;
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var204 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var205 = ((int *) var200)[23];
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[2] = 0x00000000;
          var208 var209 = (*var205) (var177, var203);
          var212 = scePaf_ED055C3C (var177, 0x01000004);
          var213 = ((int *) var3)[3];
          var214 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x3F800000), "=r"(sp));
          var215 = sp;
          var216 = ((int *) var213)[0];
          __asm__ ("swc1       $fpr00, 4($sp);"
                   "swc1       $fpr00, 8($sp);"
            : 
            : "=r"(sp));
          var217 = ((int *) var216)[21];
          ((int *) sp)[3] = 0x00000000;
          var220 var221 = (*var217) (var213, var215);
          var224 = scePaf_ED055C3C (var213, 0x01000002);
          var225 = ((int *) var3)[3];
          __asm__ ("mtc1       $zr, $fpr12;");
          var226 = ((int *) var225)[0];
          var227 = ((int *) var226)[22];
          var230 var231 = (*var227) (var225, 0x00000001);
          var234 = scePaf_ED055C3C (var225, 0x01000003);
          ra = ((int *) sp)[10];
        }
        else
        {

        label180:
          ra = ((int *) sp)[10];
        }
      }
      else
      {
        if (var177 != 0x00000000)
        {

        label152:
          var243 = 0x42A00000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x42A00000), "=r"(sp));
          var244 = sp;
          var245 = 0xC2240000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2240000));

        label160:
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var188 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          scePaf_07C50769 (var177, var186, 0x00000000);
          var193 = scePaf_ED055C3C (var177, 0x01000001);
          var177 = ((int *) var3)[3];
          goto label165;
        }
        else
        {
          var238 = scePaf_48BB05D5 (0x00000330);
          var239 = ((int *) var3)[2];
          var240 = var238;
          var177 = var238;
          scePaf_71B79831 (var238, var239, 0x00000000);
          ((int *) var3)[3] = var240;
          if (var240 == 0x00000000)
            goto label180;
          goto label152;
        }
      }
    }
    else
    {
      var177 = ((int *) var3)[3];
      if (var177 != 0x00000000)
      {

      label159:
        var185 = 0xC31B0000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC31B0000), "=r"(sp));
        var186 = sp;
        var187 = 0xC2340000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2340000));
        goto label160;
      }
      else
      {
        var180 = scePaf_48BB05D5 (0x00000330);
        var181 = ((int *) var3)[5];
        var182 = var180;
        var177 = var180;
        scePaf_71B79831 (var180, var181, 0x00000000);
        ((int *) var3)[3] = var182;
        if (var182 == 0x00000000)
          goto label180;
        goto label159;
      }
    }
  }
  var194 = ((int *) sp)[9];
  var195 = ((int *) sp)[8];
  var196 = ((int *) sp)[7];
  var197 = ((int *) sp)[6];
  var198 = ((int *) sp)[5];
  var199 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00006F30
 */
void vsh_7A71436C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0xC3280000));
  ((int *) sp)[7] = s3;
  var2 = arg1 + 0x00000040;
  ((int *) sp)[6] = s2;
  var3 = arg1;
  __asm__ ("swc1       $fpr00, 64($a0);"
    : 
    : "=r"(arg1));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  var5 = arg2;
  ((int *) sp)[11] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) arg1)[0] = 0x00000000;
  __asm__ ("swc1       $fpr00, 12($s3);"
    : 
    : "=r"(var2));
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[3] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  ((int *) arg1)[7] = 0x00000000;
  ((int *) arg1)[8] = 0x00000000;
  ((int *) arg1)[9] = 0x00000000;
  ((int *) var3)[10] = arg2;
  ((int *) arg1)[11] = 0x00000000;
  ((char *) arg1)[48] = 0x00000000;
  ((int *) var2)[1] = 0x00000000;
  ((int *) var2)[2] = 0x00000000;
  if (arg2 == 0x00000100)
  {
    var282 = 0xC3280000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC3280000));
    ((int *) sp)[1] = 0x00000000;
  }
  else
  {
    if (arg2 == 0x00001000)
    {
      var281 = 0xC3020000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3020000));
      ((int *) sp)[1] = 0x00000000;
    }
    else
    {
      ((int *) sp)[1] = 0x00000000;
      var6 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
    }
  }
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var7 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  ((int *) sp)[2] = 0x00000000;
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[2];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[0];
  var12 = ((int *) var3)[1];
  ((int *) var3)[17] = var8;
  ((int *) var3)[16] = var11;
  ((int *) var3)[18] = var9;
  ((int *) var3)[19] = var10;
  if (var12 != 0x00000000)
  {

  label13:
    var19 = ((int *) var12)[0];
    var20 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var21 = sp;
    var22 = ((int *) var19)[23];
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var25 var26 = (*var22) (var12, var21);
    var29 = scePaf_ED055C3C (var12, 0x01000004);
    var30 = ((int *) var3)[1];
    scePaf_07C50769 (var30, var2, 0x00000000);
    var35 = scePaf_ED055C3C (var30, 0x01000001);
  }
  else
  {
    var15 = scePaf_48BB05D5 (0x00000330);
    var16 = var15;
    var12 = var15;
    scePaf_71B79831 (var15, arg4, 0x00000000);
    ((int *) var3)[1] = var16;
    if (!(var16 == 0x00000000))
      goto label13;
  }
  var36 = ((int *) var3)[2];
  if (var36 != 0x00000000)
  {
    var280 = ((int *) var36)[115];

  label29:
    scePaf_1AA1A452 (var44, var43, 0x00000000, 0x00000010);
    var47 = ((int *) var3)[2];
    var48 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var49 = ((int *) var47)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var50 = ((int *) var49)[21];
    var51 = sp;
    var54 var55 = (*var50) (var47, var51);
    var58 = scePaf_ED055C3C (var47, 0x01000002);
    var59 = ((int *) var3)[2];
    var60 = 0x43F00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x43F00000), "=r"(sp));
    var61 = 0x43880000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x43880000));
    var62 = ((int *) var59)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var63 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var64 = sp;
    var65 = ((int *) var62)[23];
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    var68 var69 = (*var65) (var59, var64);
    var72 = scePaf_ED055C3C (var59, 0x01000004);
    var73 = ((int *) var3)[2];
    var74 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var75 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    scePaf_07C50769 (var73, var75, 0x00000000);
    var80 = scePaf_ED055C3C (var73, 0x01000001);
    var81 = ((int *) var3)[2];
    __asm__ ("mtc1       $zr, $fpr12;");
    var82 = ((int *) var81)[0];
    var83 = ((int *) var82)[22];
    var86 var87 = (*var83) (var81, 0x00000001);
    var90 = scePaf_ED055C3C (var81, 0x01000003);
    var91 = ((int *) var3)[2];
    var92 = ((int *) var91)[0];
    var93 = ((int *) var92)[28];
    var96 var97 = (*var93) (var91, 0x00000019, 0x00000003);
  }
  else
  {
    var39 = scePaf_48BB05D5 (0x00000330);
    var40 = var39;
    scePaf_71B79831 (var39, arg3, 0x00000000);
    var43 = var40;
    ((int *) var3)[2] = var40;
    if (!(var40 == 0x00000000))
    {
      var44 = ((int *) var43)[115];
      goto label29;
    }
  }
  if (((((var5 ^ 0x00000100) < 0x00000001)) | (((var5 ^ 0x00001000) < 0x00000001))) == 0x00000000)
  {
    var122 = ((int *) var3)[6];
  }
  else
  {
    var98 = ((int *) var3)[4];
    if (var98 == 0x00000000)
    {
      var275 = scePaf_48BB05D5 (0x00000340);
      var276 = ((int *) var3)[1];
      var277 = var275;
      scePaf_F52058EA (var275, var276, 0x00000000);
      var98 = var277;
      ((int *) var3)[4] = var277;
      if (!(var277 == 0x00000000))
      {
        var99 = ((int *) var3)[10];

      label59:
        if (var99 == 0x00000100)
        {
          var267 = ((int *) var98)[0];
          var268 = ((int *) var267)[28];
          var271 var272 = (*var268) (var98, 0x00000033, 0x0000000A);
        }
        __asm__ ("mtc1       $zr, $fpr12;");
        var100 = ((int *) var3)[4];
        __asm__ ("mov.s      $fpr13, $fpr12;");
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_D4E25D69 (var100);
        var103 = ((int *) var3)[10];
        var104 = ((int *) var3)[4];
        if (var103 == 0x00000100)
        {
          var264 = 0xC3040000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC3040000), "=r"(sp));
          var265 = 0xC1200000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 4($sp);"
            : 
            : "=r"(0xC1200000), "=r"(sp));
          var266 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
        }
        else
        {
          var105 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[0] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[1] = 0x00000000;
          ((int *) sp)[2] = 0x00000000;
        }
        var106 = sp;
        scePaf_07C50769 (var104, var106, 0x00000000);
        var111 = scePaf_ED055C3C (var104, 0x01000001);
        var112 = ((int *) var3)[4];
        __asm__ ("mtc1       $zr, $fpr12;");
        var113 = ((int *) var112)[0];
        var114 = ((int *) var113)[22];
        var117 var118 = (*var114) (var112, 0x00000001);
        var121 = scePaf_ED055C3C (var112, 0x01000003);
      }
    }
    else
    {
      var99 = ((int *) var3)[10];
      goto label59;
    }
    var122 = ((int *) var3)[6];
  }
  if (var122 != 0x00000000)
  {

  label85:
    scePaf_CA38E212 (var127, 0x00080001, 0x00008048, var3);
    var132 = ((int *) var3)[6];
    scePaf_CA38E212 (var132, 0x00080002, 0x00008048, var3);
    var135 = ((int *) var3)[6];
    var136 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var137 = ((int *) var135)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var138 = ((int *) var137)[21];
    var139 = sp;
    var142 var143 = (*var138) (var135, var139);
    var146 = scePaf_ED055C3C (var135, 0x01000002);
    var147 = ((int *) var3)[6];
    var148 = 0x43100000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x43100000), "=r"(sp));
    var149 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42A00000));
    var150 = ((int *) var147)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var151 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var152 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var153 = ((int *) var150)[23];
    ((int *) sp)[2] = 0x00000000;
    var156 var157 = (*var153) (var147, var152);
    var160 = scePaf_ED055C3C (var147, 0x01000004);
    var161 = ((int *) var3)[6];
    scePaf_46B3EE71 (var161, 0x0000FFFF);
    var164 = ((int *) var3)[6];
    scePaf_A366A11A (var164, 0x00000001);
    var167 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var168 = ((int *) var3)[6];
    scePaf_78FCC6CC (var168);
    var171 = ((int *) var3)[6];
    __asm__ ("mtc1       $zr, $fpr12;");
    var172 = ((int *) var171)[0];
    var173 = ((int *) var172)[22];
    var176 var177 = (*var173) (var171, 0x00000001);
    var180 = scePaf_ED055C3C (var171, 0x01000003);
    var181 = ((int *) var3)[6];
    if (var5 == 0x00000100)
    {
      var260 = 0xC3040000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC3040000), "=r"(sp));
      var261 = 0xC1200000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC1200000));
      var262 = sp;
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var263 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[2] = 0x00000000;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
    }
    else
    {
      var182 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[0] = 0x00000000;
      var183 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
    }
    scePaf_07C50769 (var181, var183, 0x00000000);
    var188 = scePaf_ED055C3C (var181, 0x01000001);
  }
  else
  {
    var125 = scePaf_48BB05D5 (0x00000330);
    var126 = ((int *) var3)[1];
    var127 = var125;
    scePaf_A1756BC8 (var125, var126, 0x00000000);
    ((int *) var3)[6] = var127;
    if (!(var127 == 0x00000000))
    {
      goto label85;
    }
  }
  ra = ((int *) sp)[11];
  if (!(var5 == 0x00000000))
  {
    var189 = ((int *) var3)[5];
    if (var189 == 0x00000000)
    {
      var249 = ((int *) var3)[2];
      var190 = ((int *) var3)[3];
      if (var249 == 0x00000000)
      {

      label137:
        if (var190 != 0x00000000)
        {
          var214 = ((int *) var190)[0];
          var215 = 0x439B0000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x439B0000), "=r"(sp));
          var216 = 0x43340000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x43340000));
          var217 = sp;
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var218 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var219 = ((int *) var214)[23];
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[2] = 0x00000000;
          var222 var223 = (*var219) (var190, var217);
          var226 = scePaf_ED055C3C (var190, 0x01000004);
          var227 = ((int *) var3)[3];
          var228 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x3F800000), "=r"(sp));
          var229 = sp;
          var230 = ((int *) var227)[0];
          __asm__ ("swc1       $fpr00, 4($sp);"
                   "swc1       $fpr00, 8($sp);"
            : 
            : "=r"(sp));
          var231 = ((int *) var230)[21];
          ((int *) sp)[3] = 0x00000000;
          var234 var235 = (*var231) (var227, var229);
          var238 = scePaf_ED055C3C (var227, 0x01000002);
          var239 = ((int *) var3)[3];
          __asm__ ("mtc1       $zr, $fpr12;");
          var240 = ((int *) var239)[0];
          var241 = ((int *) var240)[22];
          var244 var245 = (*var241) (var239, 0x00000001);
          var248 = scePaf_ED055C3C (var239, 0x01000003);
          ra = ((int *) sp)[11];
        }
        else
        {

        label152:
          ra = ((int *) sp)[11];
        }
      }
      else
      {
        if (var190 != 0x00000000)
        {

        label124:
          var257 = 0x42A00000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x42A00000), "=r"(sp));
          var258 = sp;
          var259 = 0xC2240000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2240000));

        label132:
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var201 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          scePaf_07C50769 (var190, var199, 0x00000000);
          var206 = scePaf_ED055C3C (var190, 0x01000001);
          var190 = ((int *) var3)[3];
          goto label137;
        }
        else
        {
          var252 = scePaf_48BB05D5 (0x00000330);
          var253 = ((int *) var3)[2];
          var254 = var252;
          var190 = var252;
          scePaf_71B79831 (var252, var253, 0x00000000);
          ((int *) var3)[3] = var254;
          if (var254 == 0x00000000)
            goto label152;
          goto label124;
        }
      }
    }
    else
    {
      var190 = ((int *) var3)[3];
      if (var190 != 0x00000000)
      {

      label131:
        var198 = 0xC31B0000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC31B0000), "=r"(sp));
        var199 = sp;
        var200 = 0xC2340000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2340000));
        goto label132;
      }
      else
      {
        var193 = scePaf_48BB05D5 (0x00000330);
        var194 = ((int *) var3)[5];
        var195 = var193;
        var190 = var193;
        scePaf_71B79831 (var193, var194, 0x00000000);
        ((int *) var3)[3] = var195;
        if (var195 == 0x00000000)
          goto label152;
        goto label131;
      }
    }
  }
  var207 = ((int *) sp)[10];
  var208 = ((int *) sp)[9];
  var209 = ((int *) sp)[8];
  var210 = ((int *) sp)[7];
  var211 = ((int *) sp)[6];
  var212 = ((int *) sp)[5];
  var213 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000076EC
 */
void sub_076EC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[4];
  ((int *) var1)[10] = arg2;
  if (!(var2 == 0x00000000))
  {
    if (arg2 == 0x00000100)
    {
      var3 = ((int *) var2)[0];
    }
    else
    {
      var3 = ((int *) var2)[0];
    }
    var4 = ((int *) var3)[28];
    var7 var8 = (*var4) (var2, 0x00000033, 0x00000000, var2, arg5, arg6, arg7, arg8);
    var9 = ((int *) var1)[4];
    var10 = ((int *) var1)[10];
    var11 = ((int *) var9)[0];
    var12 = ((int *) var11)[32];
    var15 var16 = (*var12) (var9, 0x00000000, 0x0000001A, (!((var10 ^ 0x00001000)) ? 0x00000000 : 0x00000003));
  }
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000777C
 */
void vsh_489F6A4F (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  vsh_7DB6C1BF (arg1);
  var4 = ((int *) var1)[1];
  if (var4 != 0x00000000)
  {
    var13 = ((int *) var4)[0];
    var14 = ((int *) var13)[4];
    var17 var18 = (*var14) (var4);
    var5 = ((int *) var1)[5];
  }
  else
  {
    var5 = ((int *) var1)[5];
  }
  if (var5 != 0x00000000)
  {

  label11:
    var7 = ((int *) var5)[0];
    var8 = ((int *) var7)[4];
    var11 var12 = (*var8) (var5);
    ((int *) var1)[9] = 0x00000000;
  }
  else
  {
    var5 = ((int *) var1)[2];
    if (var5 != 0x00000000)
      goto label11;
    ((int *) var1)[9] = 0x00000000;
  }
  ((int *) var1)[0] = 0x00000000;
  ((int *) var1)[1] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) var1)[4] = 0x00000000;
  ((int *) var1)[5] = 0x00000000;
  ((int *) var1)[6] = 0x00000000;
  ((int *) var1)[7] = 0x00000000;
  ((int *) var1)[8] = 0x00000000;
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000781C
 */
void sub_0781C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  var2 = ((int *) arg1)[5];
  if (var2 != 0x00000000)
  {
    __asm__ ("mtc1       $zr, $fpr12;");
    scePaf_54BB1681 (var2, 0x00000000);
    var70 = 0x41F00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x41F00000));
    var71 = ((int *) var1)[5];
    scePaf_D7ECE14E (var71);
    var74 = ((int *) var1)[5];
    scePaf_0E14B0B1 (var74, 0x00000000);
    var3 = ((int *) var1)[10];
  }
  else
  {
    var3 = ((int *) var1)[10];
  }
  if (var3 == 0x00000100)
  {
    var32 = ((int *) var1)[11];
    if (var32 != 0x00000000)
    {
      var56 = ((int *) var1)[4];
      var57 = sp;
      if (var56 != 0x00000000)
      {
        var61 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC1200000));
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var62 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[0] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[2] = 0x00000000;
        scePaf_07C50769 (var56, var57, 0x00000000);
        var67 = scePaf_ED055C3C (var56, 0x01000001);
        var4 = ((int *) var1)[6];
      }
      else
      {
        var4 = ((int *) var1)[6];
      }
      if (var4 == 0x00000000)
      {
        ra = ((int *) sp)[6];
      }
      else
      {
        var58 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 4($sp);"
          : 
          : "=r"(0xC1200000), "=r"(sp));
        var59 = sp;
        var60 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[0] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));

      label64:
        ((int *) sp)[2] = 0x00000000;

      label65:
        scePaf_07C50769 (var4, var8, 0x00000000);
        var13 = scePaf_ED055C3C (var4, 0x01000001);
        ra = ((int *) sp)[6];
      }
    }
    else
    {
      var33 = ((int *) var1)[1];
      var34 = sp;
      if (var33 != 0x00000000)
      {
        var49 = 0xC3280000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3280000));
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var50 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[1] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[2] = 0x00000000;
        scePaf_07C50769 (var33, var34, 0x00000000);
        var55 = scePaf_ED055C3C (var33, 0x01000001);
        var35 = ((int *) var1)[4];
      }
      else
      {
        var35 = ((int *) var1)[4];
      }
      var36 = sp;
      if (var35 != 0x00000000)
      {
        var41 = 0xC3040000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC3040000), "=r"(sp));
        var42 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC1200000));
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var43 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_07C50769 (var35, var36, 0x00000000);
        var48 = scePaf_ED055C3C (var35, 0x01000001);
        var4 = ((int *) var1)[6];
      }
      else
      {
        var4 = ((int *) var1)[6];
      }
      if (var4 == 0x00000000)
      {
        ra = ((int *) sp)[6];
      }
      else
      {
        var37 = 0xC3040000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC3040000), "=r"(sp));
        var38 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC1200000));
        var39 = sp;
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var40 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        goto label65;
      }
    }
  }
  else
  {
    if (var3 == 0x00001000)
    {
      var14 = ((int *) var1)[11];
      if (var14 != 0x00000000)
      {
        var17 = ((int *) var1)[4];
      }
      else
      {
        var15 = ((int *) var1)[1];
        var16 = sp;
        if (var15 != 0x00000000)
        {
          var25 = 0xC3020000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC3020000));
          __asm__ ("swc1       $fpr00, 0($sp);"
            : 
            : "=r"(sp));
          var26 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[1] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[2] = 0x00000000;
          scePaf_07C50769 (var15, var16, 0x00000000);
          var31 = scePaf_ED055C3C (var15, 0x01000001);
          var17 = ((int *) var1)[4];
        }
        else
        {
          var17 = ((int *) var1)[4];
        }
      }
      if (var17 == 0x00000000)
      {
        var4 = ((int *) var1)[6];
      }
      else
      {
        var18 = sp;
        var19 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[0] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[1] = 0x00000000;
        ((int *) sp)[2] = 0x00000000;
        scePaf_07C50769 (var17, var18, 0x00000000);
        var24 = scePaf_ED055C3C (var17, 0x01000001);
        var4 = ((int *) var1)[6];
      }
    }
    else
    {
      var4 = ((int *) var1)[6];
    }
    if (var4 != 0x00000000)
    {
      ((int *) sp)[0] = 0x00000000;
      var7 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var8 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      goto label64;
    }
    else
    {
      ra = ((int *) sp)[6];
    }
  }
  var5 = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00007B04
 */
void vsh_7DB6C1BF (int arg1)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[21] = s1;
  var1 = arg1;
  ((int *) sp)[22] = ra;
  ((int *) sp)[20] = s0;
  var2 = ((int *) arg1)[5];
  if (var2 != 0x00000000)
  {
    __asm__ ("mtc1       $zr, $fpr12;");
    scePaf_54BB1681 (var2, 0x00000002);
    var192 = ((int *) var1)[5];
    scePaf_0E14B0B1 (var192, 0x00000000);
    var195 = sp;
    sub_32328 (var195, 0x00000000);
    var198 = ((int *) var1)[5];
    var199 = sp;
    var200 = ((int *) var198)[0];
    var201 = ((int *) var200)[43];
    var204 var205 = (*var201) (var198, var199, 0x00000000);
    var206 = ((int *) sp)[0];
    if (var206 == 0x00000000)
    {
      var219 = ((int *) var1)[5];
    }
    else
    {
      var207 = ((int *) var206)[1];
      var208 = var207 + 0xFFFFFFFF;
      ((int *) var206)[1] = var208;
      if (var208 <= 0)
      {
        var212 = ((int *) var206)[0];
        var213 = ((int *) var212)[1];
        var216 var217 = (*var213) (var206);
        var218 = ((int *) var1)[5];
      }
      else
      {
        var209 = ((int *) var1)[5];
      }
    }
    scePaf_57F4BB8A (var209, 0x00000000, 0x00000000);
    var4 = ((int *) var1)[3];
  }
  else
  {
    var3 = ((int *) var1)[2];
    if (var3 != 0x00000000)
    {
      var170 = sp;
      sub_32328 (var170, 0x00000000);
      var173 = ((int *) var1)[2];
      var174 = sp;
      var175 = ((int *) var173)[0];
      var176 = ((int *) var175)[43];
      var179 var180 = (*var176) (var173, var174, 0x00000000);
      var181 = ((int *) sp)[0];
      if (var181 == 0x00000000)
      {
        var4 = ((int *) var1)[3];
      }
      else
      {
        var182 = ((int *) var181)[1];
        var183 = var182 + 0xFFFFFFFF;
        ((int *) var181)[1] = var183;
        if (var183 > 0)
        {

        label33:
          var4 = ((int *) var1)[3];
        }
        else
        {
          var184 = ((int *) var181)[0];
          var185 = ((int *) var184)[1];
          var188 var189 = (*var185) (var181);
          var4 = ((int *) var1)[3];
        }
      }
    }
    else
    goto label33;
  }
  if (var4 != 0x00000000)
  {
    var150 = sp;
    sub_32328 (var150, 0x00000000);
    var153 = ((int *) var1)[3];
    var154 = sp;
    var155 = ((int *) var153)[0];
    var156 = ((int *) var155)[43];
    var159 var160 = (*var156) (var153, var154, 0x00000000);
    var161 = ((int *) sp)[0];
    if (var161 == 0x00000000)
    {
      var5 = ((int *) var1)[4];
    }
    else
    {
      var162 = ((int *) var161)[1];
      var163 = var162 + 0xFFFFFFFF;
      ((int *) var161)[1] = var163;
      if (var163 > 0)
      {

      label46:
        var5 = ((int *) var1)[4];
      }
      else
      {
        var164 = ((int *) var161)[0];
        var165 = ((int *) var164)[1];
        var168 var169 = (*var165) (var161);
        var5 = ((int *) var1)[4];
      }
    }
  }
  else
  goto label46;
  if (var5 != 0x00000000)
  {
    var19 = sp;
    sub_32328 (var19, 0x00000000);
    var22 = ((int *) var1)[4];
    var23 = sp;
    var24 = ((int *) var22)[0];
    var25 = ((int *) var24)[43];
    var28 var29 = (*var25) (var22, var23, 0x00000000);
    var30 = ((int *) sp)[0];
    if (var30 == 0x00000000)
    {
      var33 = sp;
    }
    else
    {
      var31 = ((int *) var30)[1];
      var32 = var31 + 0xFFFFFFFF;
      ((int *) var30)[1] = var32;
      if (var32 <= 0)
      {
        var144 = ((int *) var30)[0];
        var145 = ((int *) var144)[1];
        var148 var149 = (*var145) (var30);
        var33 = sp;
      }
      else
      {
        var33 = sp;
      }
    }
    sub_32328 (var33, 0x00000000);
    var36 = ((int *) var1)[4];
    var37 = sp;
    var38 = ((int *) var36)[0];
    var39 = ((int *) var38)[43];
    var42 var43 = (*var39) (var36, var37, 0x00000007);
    var44 = ((int *) sp)[0];
    if (var44 == 0x00000000)
    {
      var47 = sp;
    }
    else
    {
      var45 = ((int *) var44)[1];
      var46 = var45 + 0xFFFFFFFF;
      ((int *) var44)[1] = var46;
      if (var46 <= 0)
      {
        var138 = ((int *) var44)[0];
        var139 = ((int *) var138)[1];
        var142 var143 = (*var139) (var44);
        var47 = sp;
      }
      else
      {
        var47 = sp;
      }
    }
    sub_32328 (var47, 0x00000000);
    var50 = ((int *) var1)[4];
    var51 = sp;
    var52 = ((int *) var50)[0];
    var53 = ((int *) var52)[43];
    var56 var57 = (*var53) (var50, var51, 0x0000000E);
    var58 = ((int *) sp)[0];
    if (var58 == 0x00000000)
    {
      var61 = sp;
    }
    else
    {
      var59 = ((int *) var58)[1];
      var60 = var59 + 0xFFFFFFFF;
      ((int *) var58)[1] = var60;
      if (var60 <= 0)
      {
        var132 = ((int *) var58)[0];
        var133 = ((int *) var132)[1];
        var136 var137 = (*var133) (var58);
        var61 = sp;
      }
      else
      {
        var61 = sp;
      }
    }
    sub_32328 (var61, 0x00000000);
    var64 = ((int *) var1)[4];
    var65 = sp;
    var66 = ((int *) var64)[0];
    var67 = ((int *) var66)[43];
    var70 var71 = (*var67) (var64, var65, 0x0000000A);
    var72 = ((int *) sp)[0];
    if (var72 == 0x00000000)
    {
      var75 = sp;
    }
    else
    {
      var73 = ((int *) var72)[1];
      var74 = var73 + 0xFFFFFFFF;
      ((int *) var72)[1] = var74;
      if (var74 <= 0)
      {
        var126 = ((int *) var72)[0];
        var127 = ((int *) var126)[1];
        var130 var131 = (*var127) (var72);
        var75 = sp;
      }
      else
      {
        var75 = sp;
      }
    }
    sub_32328 (var75, 0x00000000);
    var78 = ((int *) var1)[4];
    var79 = sp;
    var80 = ((int *) var78)[0];
    var81 = ((int *) var80)[43];
    var84 var85 = (*var81) (var78, var79, 0x0000000B);
    var86 = ((int *) sp)[0];
    if (var86 == 0x00000000)
    {
      var89 = sp;
    }
    else
    {
      var87 = ((int *) var86)[1];
      var88 = var87 + 0xFFFFFFFF;
      ((int *) var86)[1] = var88;
      if (var88 <= 0)
      {
        var120 = ((int *) var86)[0];
        var121 = ((int *) var120)[1];
        var124 var125 = (*var121) (var86);
        var89 = sp;
      }
      else
      {
        var89 = sp;
      }
    }
    var90 = sp + 0x00000010;
    sub_32328 (var89, 0x00000000);
    sub_32328 (var90, 0x00000000);
    var95 = ((int *) var1)[4];
    var96 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    var97 = sp + 0x00000020;
    var98 = sp + 0x00000030;
    var99 = sp;
    __asm__ ("swc1       $fpr00, 32($sp);"
             "swc1       $fpr00, 36($sp);"
             "swc1       $fpr00, 40($sp);"
             "swc1       $fpr00, 44($sp);"
             "swc1       $fpr00, 48($sp);"
             "swc1       $fpr00, 52($sp);"
             "swc1       $fpr00, 56($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 60($sp);"
      : 
      : "=r"(sp));
    scePaf_84551560 (var95, var99, var90, var97, var98, 0x0000003C, 0x0000001E);
    var102 = ((int *) sp)[4];
    if (var102 == 0x00000000)
    {
      var105 = ((int *) sp)[0];
    }
    else
    {
      var103 = ((int *) var102)[1];
      var104 = var103 + 0xFFFFFFFF;
      ((int *) var102)[1] = var104;
      if (var104 <= 0)
      {
        var114 = ((int *) var102)[0];
        var115 = ((int *) var114)[1];
        var118 var119 = (*var115) (var102);
        var105 = ((int *) sp)[0];
      }
      else
      {
        var105 = ((int *) sp)[0];
      }
    }
    if (var105 == 0x00000000)
    {
      var6 = ((int *) var1)[6];
    }
    else
    {
      var106 = ((int *) var105)[1];
      var107 = var106 + 0xFFFFFFFF;
      ((int *) var105)[1] = var107;
      if (var107 > 0)
      {

      label123:
        var6 = ((int *) var1)[6];
      }
      else
      {
        var108 = ((int *) var105)[0];
        var109 = ((int *) var108)[1];
        var112 var113 = (*var109) (var105);
        var6 = ((int *) var1)[6];
      }
    }
  }
  else
  goto label123;
  var7 = sp + 0x00000040;
  if (var6 != 0x00000000)
  {
    sub_32348 (var7, 0x00000000);
    var12 = ((int *) var1)[6];
    var15 = scePaf_80885EEA (var12, var7);
    var16 = ((int *) sp)[16];
    if (var16 == 0x00000000)
    {
      ra = ((int *) sp)[22];
    }
    else
    {
      scePaf_65FDC4C5 (var16);
      ra = ((int *) sp)[22];
    }
  }
  else
  {
    ra = ((int *) sp)[22];
  }
  var8 = ((int *) sp)[21];
  var9 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00007F4C
 */
void vsh_26078FD6 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  ((int *) sp)[10] = ra;
  ((int *) sp)[8] = s0;
  var2 = ((int *) arg1)[6];
  ((char *) arg1)[48] = 0x00000001;
  if (var2 != 0x00000000)
  {
    var5 = sp;
    var6 = sp + 0x00000010;
    sub_32348 (var5, 0x00000000);
    sub_32368 (var6, 0x00000000);
    var11 = ((int *) var1)[6];
    var12 = sp;
    scePaf_509EC334 (var11, var12);
    var15 = ((int *) var1)[6];
    scePaf_A17AE3D4 (var15, var6);
    var18 = ((int *) sp)[0];
    var19 = ((int *) sp)[4];
    if (var18 != 0x00000000)
    {

    label13:
      var20 = ((int *) var1)[6];
      var23 = scePaf_C60EF86C (var20, 0x00000000);
      if (var23 == 0x00000000)
      {
        var33 = ((int *) var1)[6];
        scePaf_D628F663 (var33);
        var18 = ((int *) sp)[0];
      }
      else
      {
        var18 = ((int *) sp)[0];
      }
    }
    else
    {
      if (!(var19 == 0x00000000))
        goto label13;
    }
    if (var18 == 0x00000000)
    {
      var30 = ((int *) var1)[6];
      sub_08048 (var30, 0x00000000, var1);
      var24 = ((int *) sp)[4];
    }
    else
    {
      var24 = ((int *) sp)[4];
    }
    if (var24 != 0x00000000)
    {
      scePaf_65FDC4C5 (var24);
      var25 = ((int *) sp)[0];
    }
    else
    {
      var25 = ((int *) sp)[0];
    }
    if (var25 == 0x00000000)
    {
      ra = ((int *) sp)[10];
    }
    else
    {
      scePaf_65FDC4C5 (var25);
      ra = ((int *) sp)[10];
    }
  }
  else
  {
    ra = ((int *) sp)[10];
  }
  var3 = ((int *) sp)[9];
  var4 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00008048
 */
void sub_08048 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[13] = s1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[12] = s0;
  var1 = ((unsigned char *) arg3)[48];
  var2 = arg3;
  if (var1 != 0x00000000)
  {
    var7 = vsh_1004B7DC (arg3);
    if (var7 == 0x00000000)
    {
      sub_09D3C (var2);
      var10 = ((int *) var2)[11];
    }
    else
    {
      sub_09DD4 (var2);
      var10 = ((int *) var2)[11];
    }
    if ((((var10 + 0xFFFFFFFE) < 0x00000003)) != 0x00000000)
    {
      var45 = ((int *) var2)[4];

    label32:
      if (var45 == 0x00000000)
      {
        var14 = ((int *) var2)[6];

      label70:
        if (var14 != 0x00000000)
        {
          ((int *) sp)[8] = 0x00000000;
          var21 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var22 = ((int *) var14)[0];
          ((int *) sp)[9] = 0x00000000;
          var23 = sp + 0x00000020;
          __asm__ ("swc1       $fpr00, 44($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[10] = 0x00000000;
          var24 = ((int *) var22)[50];
          __asm__ ("lwc1       $fpr13, 32($sp);");

        label73:
          var25 = 0x42F00000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42F00000));
          var28 var29 = (*var24) (var14, 0x01000001, 0x00000000, var23);
          var30 = ((int *) var2)[6];

        label76:
          if (var30 == 0x00000000)
          {
            var15 = ((int *) var2)[7];
          }
          else
          {
            ((int *) sp)[9] = 0x00000000;
            var31 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            var32 = ((int *) var30)[0];
            ((int *) sp)[10] = 0x00000000;
            var33 = sp + 0x00000020;
            __asm__ ("swc1       $fpr00, 32($sp);"
              : 
              : "=r"(sp));
            var34 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            __asm__ ("swc1       $fpr00, 44($sp);"
              : 
              : "=r"(sp));
            var35 = ((int *) var32)[50];
            __asm__ ("lwc1       $fpr13, 36($sp);");
            var38 var39 = (*var35) (var30, 0x01000003, 0x00000000, var33);
            var15 = ((int *) var2)[7];
          }
        }
        else
        {
          var15 = ((int *) var2)[7];
        }
      }
      else
      {
        var46 = ((int *) var2)[11];
        if (var46 == 0x00000000)
        {
          __asm__ ("mtc1       $zr, $fpr12;");
          scePaf_C89BDA36 (var45);
          var55 = ((int *) var2)[10];
        }
        else
        {
          var47 = ((int *) var2)[10];
          var48 = sp;
          if (var47 == 0x00000100)
          {
            var110 = 0xC1200000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 4($sp);"
              : 
              : "=r"(0xC1200000), "=r"(sp));
            var111 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[0] = 0x00000000;
            __asm__ ("swc1       $fpr00, 12($sp);"
              : 
              : "=r"(sp));
          }
          else
          {
            var49 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[0] = 0x00000000;
            __asm__ ("swc1       $fpr00, 12($sp);"
              : 
              : "=r"(sp));
            ((int *) sp)[1] = 0x00000000;
          }
          ((int *) sp)[2] = 0x00000000;
          scePaf_07C50769 (var45, var48, 0x00000000);
          var54 = scePaf_ED055C3C (var45, 0x01000001);
          var55 = ((int *) var2)[10];
        }
        var56 = ((int *) var2)[4];
        if (var55 == 0x00000100)
        {
          ((int *) sp)[0] = 0x00000000;
          var106 = 0xC1200000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC1200000));
          var107 = ((int *) var56)[0];
          __asm__ ("lwc1       $fpr13, 0($sp);"
                   "swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var108 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var60 = ((int *) var107)[50];
          var109 = 0x42F00000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42F00000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
        }
        else
        {
          ((int *) sp)[0] = 0x00000000;
          var57 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var58 = ((int *) var56)[0];
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          var59 = 0x42F00000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42F00000));
          ((int *) sp)[1] = 0x00000000;
          ((int *) sp)[2] = 0x00000000;
          var60 = ((int *) var58)[50];
          __asm__ ("lwc1       $fpr13, 0($sp);");
        }
        var61 = sp;
        var64 var65 = (*var60) (var56, 0x01000001, 0x00000000, var61);
        var66 = ((int *) var2)[4];
        var67 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mtc1       $zr, $fpr13;"
          : 
          : "=r"(0x3F800000));
        var68 = ((int *) var66)[0];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var69 = ((int *) var68)[50];
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var70 = 0x43960000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43960000));
        __asm__ ("swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var71 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var74 var75 = (*var69) (var66, 0x01000003, 0x00000000, var71);
        var76 = ((int *) var2)[10];
        if (var76 == 0x00001000)
        {
        }
        else
        {
          var77 = ((int *) var2)[11];
          var78 = sp + 0x00000020;
          if (var77 == 0x00000002)
          {
            var96 = 0x42900000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 16($sp);"
              : 
              : "=r"(0x42900000), "=r"(sp));
            var97 = 0x42200000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x42200000));
            var98 = sp + 0x00000010;
            var99 = sp;
            __asm__ ("swc1       $fpr00, 20($sp);"
              : 
              : "=r"(sp));
            var100 = sp + 0x00000020;
            var101 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[6] = 0x00000000;
            __asm__ ("swc1       $fpr00, 28($sp);"
                     "swc1       $fpr00, 32($sp);"
                     "swc1       $fpr00, 36($sp);"
              : 
              : "=r"(sp));
            ((int *) sp)[10] = 0x00000000;
            __asm__ ("swc1       $fpr00, 44($sp);"
              : 
              : "=r"(sp));
            scePaf_9F44CF86 (var99, var98, var100);
            __asm__ ("mtc1       $zr, $fpr12;");
            var104 = ((int *) var2)[4];
            var105 = sp;
          }
          else
          {
            var79 = 0x43100000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 16($sp);"
              : 
              : "=r"(0x43100000), "=r"(sp));
            var80 = 0x42A00000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 20($sp);"
              : 
              : "=r"(0x42A00000), "=r"(sp));
            var81 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            var82 = sp + 0x00000010;
            __asm__ ("swc1       $fpr00, 28($sp);"
              : 
              : "=r"(sp));
            var83 = 0x40000000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x40000000));
            __asm__ ("swc1       $fpr00, 0($sp);"
              : 
              : "=r"(sp));
            var84 = sp;
            __asm__ ("swc1       $fpr00, 4($sp);"
              : 
              : "=r"(sp));
            var85 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[6] = 0x00000000;
            ((int *) sp)[2] = 0x00000000;
            __asm__ ("swc1       $fpr00, 12($sp);"
              : 
              : "=r"(sp));
            scePaf_9F44CF86 (var78, var82, var84);
            __asm__ ("mtc1       $zr, $fpr12;");
            var88 = ((int *) var2)[4];
          }
          __asm__ ("mov.s      $fpr13, $fpr12;");
          scePaf_6F0AF8FE (var88, var78);
        }
        var30 = ((int *) var2)[6];
        if (var30 == 0x00000000)
        {
          var15 = ((int *) var2)[7];
        }
        else
        {
          var91 = ((int *) var2)[10];
          if (!(var91 != 0x00000100))
          {
            ((int *) sp)[8] = 0x00000000;
            var92 = 0xC1200000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0xC1200000));
            var93 = ((int *) var30)[0];
            __asm__ ("lwc1       $fpr13, 32($sp);"
                     "swc1       $fpr00, 36($sp);"
              : 
              : "=r"(sp));
            var94 = sp + 0x00000020;
            var95 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            var24 = ((int *) var93)[50];
            ((int *) sp)[10] = 0x00000000;
            __asm__ ("swc1       $fpr00, 44($sp);"
              : 
              : "=r"(sp));
            goto label73;
          }
          goto label76;
        }
      }
    }
    else
    {
      var11 = ((int *) var2)[5];
      if (var11 != 0x00000000)
      {
        ((int *) sp)[1] = 0x00000000;

      label18:
        var124 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var125 = ((int *) var11)[0];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var126 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        ((int *) sp)[2] = 0x00000000;
        var127 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var128 = ((int *) var125)[50];
        __asm__ ("lwc1       $fpr13, 4($sp);");
        var131 var132 = (*var128) (var11, 0x01000003, 0x00000000, var127);
        var12 = ((int *) var2)[3];
      }
      else
      {
        var11 = ((int *) var2)[2];
        if (var11 != 0x00000000)
        {
          ((int *) sp)[1] = 0x00000000;
          goto label18;
        }
        else
        {
          var12 = ((int *) var2)[3];
        }
      }
      if (var12 != 0x00000000)
      {
        var114 = ((int *) var12)[0];
        var115 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        var116 = ((int *) var114)[50];
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var117 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        var118 = 0x43960000;
        __asm__ ("mtc1       $at, $fpr13;"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(0x43960000), "=r"(sp));
        var119 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var122 var123 = (*var116) (var12, 0x01000002, 0x00000000, var119);
        var13 = ((int *) var2)[4];
      }
      else
      {
        var13 = ((int *) var2)[4];
      }
      if (var13 != 0x00000000)
      {
        var40 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var41 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43480000));
        var42 = 0x43960000;
        __asm__ ("mtc1       $at, $fpr14;"
          : 
          : "=r"(0x43960000));
        scePaf_D4E25D69 (var13);
        var45 = ((int *) var2)[4];
        goto label32;
      }
      else
      {
        var14 = ((int *) var2)[6];
        goto label70;
      }
    }
    if (var15 == 0x00000000)
    {
      ra = ((int *) sp)[14];
    }
    else
    {
      var16 = ((int *) var2)[8];
      var19 var20 = (*var15) (var16);
      ra = ((int *) sp)[14];
    }
  }
  else
  {
    ra = ((int *) sp)[14];
  }
  var3 = ((int *) sp)[13];
  var4 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x000084E8
 */
void vsh_8EFFA7C3 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  sub_09D3C (arg1);
  var4 = ((int *) var1)[5];
  ((char *) var1)[48] = 0x00000000;
  if (var4 != 0x00000000)
  {
    var41 = ((int *) var4)[0];

  label8:
    var42 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var43 = ((int *) var41)[50];
    var44 = sp;
    var47 var48 = (*var43) (var5, 0x01000003, 0x00000000, var44);
    var6 = ((int *) var1)[3];
  }
  else
  {
    var5 = ((int *) var1)[2];
    if (var5 != 0x00000000)
    {
      var41 = ((int *) var5)[0];
      goto label8;
    }
    else
    {
      var6 = ((int *) var1)[3];
    }
  }
  if (var6 != 0x00000000)
  {
    var33 = ((int *) var6)[0];
    var34 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[3] = 0x00000000;
    __asm__ ("swc1       $fpr00, 0($sp);"
             "mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    var35 = ((int *) var33)[50];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var36 = sp;
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var39 var40 = (*var35) (var6, 0x01000002, 0x00000000, var36);
    var7 = ((int *) var1)[4];
  }
  else
  {
    var7 = ((int *) var1)[4];
  }
  if (var7 != 0x00000000)
  {
    var21 = ((int *) var7)[0];
    ((int *) sp)[0] = 0x00000000;
    var22 = ((int *) var21)[50];
    ((int *) sp)[1] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    ((int *) sp)[2] = 0x00000000;
    var23 = sp;
    ((int *) sp)[3] = 0x00000000;
    var26 var27 = (*var22) (var7, 0x01000003, 0x00000000, var23);
    var28 = ((int *) var1)[4];
    __asm__ ("mtc1       $zr, $fpr12;"
             "mov.s      $fpr13, $fpr20;");
    __asm__ ("mov.s      $fpr14, $fpr21;");
    scePaf_D4E25D69 (var28);
    sub_09BB8 (var1, 0x00000000);
    var8 = ((int *) var1)[6];
  }
  else
  {
    var8 = ((int *) var1)[6];
  }
  if (var8 != 0x00000000)
  {
    scePaf_6E48A1BB ();
    var12 = ((int *) var1)[6];
    var13 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var14 = ((int *) var12)[0];
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var15 = ((int *) var14)[50];
    var16 = sp;
    var19 var20 = (*var15) (var12, 0x01000003, 0x00000000, var16);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000868C
 */
void vsh_4E385061 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var2 = ((unsigned char *) arg1)[48];
  __asm__ ("mov.s      $fpr20, $fpr12;");
  if (var2 == 0x00000000)
  {

  label34:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[11];
    if ((((var3 + 0xFFFFFFFE) < 0x00000003)) != 0x00000000)
    {
      var7 = ((int *) var1)[4];
    }
    else
    {
      var4 = ((int *) arg1)[5];
      if (var4 != 0x00000000)
      {
        var38 = ((int *) var4)[0];

      label9:
        var39 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[1] = 0x00000000;
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var40 = ((int *) var38)[50];
        var41 = sp;
        var44 var45 = (*var40) (var5, 0x01000003, 0x00000000, var41, arg5, arg6, arg7, arg8);
        var6 = ((int *) var1)[3];
      }
      else
      {
        var5 = ((int *) var1)[2];
        if (var5 != 0x00000000)
        {
          var38 = ((int *) var5)[0];
          goto label9;
        }
        else
        {
          var6 = ((int *) var1)[3];
        }
      }
      if (var6 != 0x00000000)
      {
        var30 = ((int *) var6)[0];
        var31 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        var32 = ((int *) var30)[50];
        __asm__ ("swc1       $fpr00, 4($sp);"
                 "mov.s      $fpr12, $fpr20;"
                 "mov.s      $fpr13, $fpr21;"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var33 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var36 var37 = (*var32) (var6, 0x01000002, 0x00000000, var33, arg5, arg6, arg7, arg8);
        var7 = ((int *) var1)[4];
      }
      else
      {
        var7 = ((int *) var1)[4];
      }
    }
    if (var7 != 0x00000000)
    {
      var18 = ((int *) var7)[0];
      var19 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var20 = ((int *) var18)[50];
      __asm__ ("swc1       $fpr00, 4($sp);"
               "mov.s      $fpr12, $fpr20;"
               "mov.s      $fpr13, $fpr21;"
               "swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var21 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var24 var25 = (*var20) (var7, 0x01000003, 0x00000000, var21, arg5, arg6, arg7, arg8);
      var26 = ((int *) var1)[11];
      if (var26 != 0x00000000)
      {
        var8 = ((int *) var1)[6];
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr12;");
        var27 = ((int *) var1)[4];
        scePaf_C89BDA36 (var27);
        var8 = ((int *) var1)[6];
      }
    }
    else
    {
      var8 = ((int *) var1)[6];
    }
    if (!(var8 != 0x00000000))
      goto label34;
    var10 = ((int *) var8)[0];
    var11 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[1] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "swc1       $fpr00, 0($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var12 = ((int *) var10)[50];
    var13 = sp;
    var16 var17 = (*var12) (var8, 0x01000003, 0x00000000, var13, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[5];
  }
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000882C
 */
void vsh_18A36911 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var2 = ((unsigned char *) arg1)[48];
  __asm__ ("mov.s      $fpr20, $fpr12;");
  if (var2 == 0x00000000)
  {

  label32:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[11];
    if ((((var3 + 0xFFFFFFFE) < 0x00000003)) != 0x00000000)
    {
      var7 = ((int *) var1)[4];
    }
    else
    {
      var4 = ((int *) arg1)[5];
      if (var4 != 0x00000000)
      {
        var40 = ((int *) var4)[0];

      label9:
        var41 = 0x3ECCCCCD;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3ECCCCCD), "=r"(sp));
        var42 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[1] = 0x00000000;
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var43 = ((int *) var40)[50];
        var44 = sp;
        var47 var48 = (*var43) (var5, 0x01000003, 0x00000000, var44, arg5, arg6, arg7, arg8);
        var6 = ((int *) var1)[3];
      }
      else
      {
        var5 = ((int *) var1)[2];
        if (var5 != 0x00000000)
        {
          var40 = ((int *) var5)[0];
          goto label9;
        }
        else
        {
          var6 = ((int *) var1)[3];
        }
      }
      if (var6 != 0x00000000)
      {
        var31 = ((int *) var6)[0];
        var32 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        __asm__ ("swc1       $fpr00, 4($sp);"
                 "mov.s      $fpr12, $fpr20;"
                 "mov.s      $fpr13, $fpr21;"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var33 = 0x3ECCCCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3ECCCCCD));
        var34 = ((int *) var31)[50];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var35 = sp;
        var38 var39 = (*var34) (var6, 0x01000002, 0x00000000, var35, arg5, arg6, arg7, arg8);
        var7 = ((int *) var1)[4];
      }
      else
      {
        var7 = ((int *) var1)[4];
      }
    }
    if (var7 != 0x00000000)
    {
      var19 = ((int *) var7)[0];
      var20 = 0x3ECCCCCD;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3ECCCCCD), "=r"(sp));
      __asm__ ("mov.s      $fpr12, $fpr20;");
      var21 = ((int *) var19)[50];
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      __asm__ ("mov.s      $fpr13, $fpr21;"
               "swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var22 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var25 var26 = (*var21) (var7, 0x01000003, 0x00000000, var22, arg5, arg6, arg7, arg8);
      var27 = 0x41200000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x41200000));
      var28 = ((int *) var1)[4];
      scePaf_CE17B5DC (var28);
      var8 = ((int *) var1)[6];
    }
    else
    {
      var8 = ((int *) var1)[6];
    }
    if (!(var8 != 0x00000000))
      goto label32;
    var10 = ((int *) var8)[0];
    var11 = 0x3ECCCCCD;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3ECCCCCD), "=r"(sp));
    var12 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[1] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    ((int *) sp)[2] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var13 = ((int *) var10)[50];
    var14 = sp;
    var17 var18 = (*var13) (var8, 0x01000003, 0x00000000, var14, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[5];
  }
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000089EC
 */
void vsh_B2284A12 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr22, 40($sp);"
           "mov.s      $fpr22, $fpr13;"
           "swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("swc1       $fpr23, 44($sp);"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000000;
  if (var2 == 0x00000001)
  {
    var49 = vsh_1004B7DC (arg1);
    if (var49 == 0x00000000)
    {
      sub_09D3C (var1);
      var3 = ((int *) var1)[10];
    }
    else
    {
      sub_09DD4 (var1);
      var3 = ((int *) var1)[10];
    }
  }
  else
  {
    var3 = ((int *) var1)[10];
  }
  if (var3 == 0x00000100)
  {
    var46 = 0xC3280000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC3280000));
    ((int *) sp)[1] = 0x00000000;
  }
  else
  {
    if (var3 == 0x00001000)
    {
      var45 = 0xC3020000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3020000));
      ((int *) sp)[1] = 0x00000000;
    }
    else
    {
      ((int *) sp)[1] = 0x00000000;
      var4 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
    }
  }
  ((int *) sp)[2] = 0x00000000;
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var5 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[3];
  var9 = ((int *) sp)[0];
  ((int *) var1)[18] = var6;
  var10 = ((int *) var1)[5];
  ((int *) var1)[16] = var9;
  ((int *) var1)[17] = var7;
  ((int *) var1)[19] = var8;
  if (var10 != 0x00000000)
  {
    var24 = scePaf_08EA7580 ();
    __asm__ ("mtc1       $zr, $fpr20;");
    if (var24 == 0x00000000)
    {
      var38 = 0x41F00000;
      __asm__ ("mtc1       $at, $fpr23;"
        : 
        : "=r"(0x41F00000));
      var39 = ((int *) var1)[5];
      scePaf_D90F5A94 (var39);
      __asm__ ("c.lt.s     $fpr23, $fpr00;");
      __asm__ ("bc1f       0x00008B78;");
      {
        var42 = ((int *) var1)[5];
        scePaf_D90F5A94 (var42);
        __asm__ ("sub.s      $fpr20, $fpr23, $fpr00;");
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr20;");
      }
    }
    __asm__ ("mtc1       $zr, $fpr12;");
    var25 = ((int *) var1)[5];
    scePaf_54BB1681 (var25, 0x00000000);
    var28 = ((int *) var1)[5];
    scePaf_0E14B0B1 (var28, 0x00000000);
    var31 = 0x43700000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43700000));
    var32 = ((int *) var1)[5];
    scePaf_CD63E417 (var32);
    var35 = ((int *) var1)[5];
    __asm__ ("mov.s      $fpr12, $fpr20;");
    scePaf_D7ECE14E (var35);
    var11 = ((int *) var1)[1];
  }
  else
  {
    var11 = ((int *) var1)[1];
  }
  if (var11 != 0x00000000)
  {
    var16 = ((int *) var11)[0];
    var17 = ((int *) var16)[50];
    __asm__ ("mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr22;");
    var20 var21 = (*var17) (var11, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var12 = ((int *) var1)[4];
  }
  else
  {
    var12 = ((int *) var1)[4];
  }
  if (var12 != 0x00000000)
  {
    __asm__ ("mtc1       $zr, $fpr12;");
    scePaf_C89BDA36 (var12);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var13 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr23, 44($sp);"
           "lwc1       $fpr22, 40($sp);"
           "lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00008BD8
 */
void vsh_DD78EFF5 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 68($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 64($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  __asm__ ("swc1       $fpr23, 76($sp);"
           "swc1       $fpr22, 72($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000001;
  if (var2 == 0x00000001)
  {
    var113 = vsh_1004B7DC (arg1);
    if (var113 == 0x00000000)
    {
      sub_09D3C (var1);
      ((int *) sp)[2] = 0x00000000;
    }
    else
    {
      sub_09DD4 (var1);
      ((int *) sp)[2] = 0x00000000;
    }
  }
  else
  {
    ((int *) sp)[2] = 0x00000000;
  }
  var3 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(0xC3280000), "=r"(sp));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[1] = 0x00000000;
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[0];
  ((int *) var1)[18] = var5;
  var9 = ((int *) var1)[5];
  ((int *) var1)[16] = var8;
  ((int *) var1)[17] = var6;
  ((int *) var1)[19] = var7;
  if (var9 != 0x00000000)
  {
    var90 = scePaf_08EA7580 ();
    __asm__ ("mtc1       $zr, $fpr22;");
    if (var90 == 0x00000001)
    {
      var104 = 0x41F00000;
      __asm__ ("mtc1       $at, $fpr23;"
        : 
        : "=r"(0x41F00000));
      var105 = ((int *) var1)[5];
      scePaf_D90F5A94 (var105);
      __asm__ ("c.lt.s     $fpr23, $fpr00;");
      __asm__ ("bc1f       0x00008F74;");
      {
        var108 = ((int *) var1)[5];
        scePaf_D90F5A94 (var108);
        __asm__ ("sub.s      $fpr22, $fpr23, $fpr00;");
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr22;");
      }
    }
    __asm__ ("mtc1       $zr, $fpr12;");
    var91 = ((int *) var1)[5];
    scePaf_54BB1681 (var91, 0x00000001);
    var94 = ((int *) var1)[5];
    scePaf_0E14B0B1 (var94, 0x00000000);
    var97 = 0x43700000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43700000));
    var98 = ((int *) var1)[5];
    scePaf_CD63E417 (var98);
    var101 = ((int *) var1)[5];
    __asm__ ("mov.s      $fpr12, $fpr22;");
    scePaf_D7ECE14E (var101);
    var10 = ((unsigned char *) var1)[48];
  }
  else
  {
    var10 = ((unsigned char *) var1)[48];
  }
  if (var10 == 0x00000001)
  {
    var57 = ((int *) var1)[5];
    if (var57 != 0x00000000)
    {
      var80 = ((int *) var57)[0];

    label40:
      var81 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[1] = 0x00000000;
      __asm__ ("swc1       $fpr00, 0($sp);"
               "mov.s      $fpr12, $fpr20;"
               "mov.s      $fpr13, $fpr21;"
        : 
        : "=r"(sp));
      ((int *) sp)[2] = 0x00000000;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var82 = ((int *) var80)[50];
      var83 = sp;
      var86 var87 = (*var82) (var58, 0x01000003, 0x00000000, var83, arg5, arg6, arg7, arg8);
      var59 = ((int *) var1)[3];
    }
    else
    {
      var58 = ((int *) var1)[2];
      if (var58 != 0x00000000)
      {
        var80 = ((int *) var58)[0];
        goto label40;
      }
      else
      {
        var59 = ((int *) var1)[3];
      }
    }
    if (var59 != 0x00000000)
    {
      var71 = ((int *) var59)[0];
      __asm__ ("mtc1       $zr, $fpr12;");
      var72 = 0x43960000;
      __asm__ ("mtc1       $at, $fpr13;"
        : 
        : "=r"(0x43960000));
      var73 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "add.s      $fpr12, $fpr20, $fpr12;"
               "add.s      $fpr13, $fpr21, $fpr13;"
        : 
        : "=r"(0x3F800000));
      var74 = ((int *) var71)[50];
      __asm__ ("swc1       $fpr00, 0($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var75 = sp;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var78 var79 = (*var74) (var59, 0x01000002, 0x00000000, var75, arg5, arg6, arg7, arg8);
      var60 = ((int *) var1)[4];
    }
    else
    {
      var60 = ((int *) var1)[4];
    }
    if (var60 != 0x00000000)
    {
      __asm__ ("mtc1       $zr, $fpr13;");
      var67 = 0x43960000;
      __asm__ ("mtc1       $at, $fpr14;"
               "add.s      $fpr14, $fpr21, $fpr14;"
        : 
        : "=r"(0x43960000));
      var68 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("add.s      $fpr13, $fpr20, $fpr13;");
      scePaf_D4E25D69 (var60);
      var61 = ((int *) var1)[7];
    }
    else
    {
      var61 = ((int *) var1)[7];
    }
    if (var61 == 0x00000000)
    {
      var11 = ((int *) var1)[1];
    }
    else
    {
      var62 = ((int *) var1)[8];
      var65 var66 = (*var61) (var62, var7, arg3, arg4, arg5, arg6, arg7, arg8);
      var11 = ((int *) var1)[1];
    }
  }
  else
  {
    var11 = ((int *) var1)[1];
  }
  if (var11 != 0x00000000)
  {
    var51 = ((int *) var11)[0];
    var52 = ((int *) var51)[50];
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    var55 var56 = (*var52) (var11, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var12 = ((int *) var1)[4];
  }
  else
  {
    var12 = ((int *) var1)[4];
  }
  if (var12 == 0x00000000)
  {
    var38 = ((int *) var1)[6];
  }
  else
  {
    var13 = ((int *) var1)[10];
    var14 = sp + 0x00000020;
    if (!(var13 == 0x00001000))
    {
      var15 = 0x43100000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 16($sp);"
        : 
        : "=r"(0x43100000), "=r"(sp));
      var16 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x42A00000));
      var17 = sp + 0x00000010;
      __asm__ ("swc1       $fpr00, 20($sp);"
        : 
        : "=r"(sp));
      var18 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var19 = sp;
      __asm__ ("swc1       $fpr00, 28($sp);"
        : 
        : "=r"(sp));
      var20 = 0x40000000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x40000000));
      __asm__ ("swc1       $fpr00, 32($sp);"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      var21 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[6] = 0x00000000;
      ((int *) sp)[10] = 0x00000000;
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      scePaf_9F44CF86 (var19, var17, var14);
      var24 = sp;
      var25 = ((int *) var1)[4];
      __asm__ ("mov.s      $fpr12, $fpr20;");
      __asm__ ("mov.s      $fpr13, $fpr21;");
      scePaf_6F0AF8FE (var25, var24);
    }
    var28 = ((int *) var1)[4];
    var29 = 0xC2800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0xC2800000), "=r"(sp));
    var30 = 0x42480000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr12, $fpr20;"
             "swc1       $fpr00, 36($sp);"
      : 
      : "=r"(0x42480000), "=r"(sp));
    var31 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    scePaf_E079C92B (var28, var14);
    var34 = 0x41200000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x41200000));
    var35 = ((int *) var1)[4];
    scePaf_CE17B5DC (var35);
    var38 = ((int *) var1)[6];
  }
  if (var38 != 0x00000000)
  {
    var41 = ((int *) var38)[0];
    var42 = 0x43100000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0x43100000), "=r"(sp));
    var43 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42A00000));
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    var44 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr12, $fpr20;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("mov.s      $fpr13, $fpr21;");
    var45 = sp + 0x00000020;
    var46 = ((int *) var41)[50];
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    var49 var50 = (*var46) (var38, 0x01000004, 0x00000004, var45);
    ra = ((int *) sp)[14];
  }
  else
  {
    ra = ((int *) sp)[14];
  }
  var39 = ((int *) sp)[13];
  var40 = ((int *) sp)[12];
  __asm__ ("lwc1       $fpr23, 76($sp);"
           "lwc1       $fpr22, 72($sp);"
           "lwc1       $fpr21, 68($sp);"
           "lwc1       $fpr20, 64($sp);");
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00008FB4
 */
void vsh_447ACC46 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 68($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 64($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000002;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  if (var2 == 0x00000001)
  {
    sub_09D3C (arg1);
    var3 = ((int *) var1)[10];
  }
  else
  {
    var3 = ((int *) var1)[10];
  }
  if (var3 == 0x00000100)
  {
    var73 = 0xC2A00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0xC2A00000), "=r"(sp));
    var74 = 0x42BE0000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42BE0000));
    ((int *) sp)[2] = 0x00000000;
  }
  else
  {
    ((int *) sp)[2] = 0x00000000;
    var4 = 0xC2A00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0xC2A00000), "=r"(sp));
    var5 = 0x42AA0000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42AA0000));
  }
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var6 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[3];
  var10 = ((int *) sp)[0];
  ((int *) var1)[18] = var7;
  var11 = ((int *) var1)[1];
  ((int *) var1)[16] = var10;
  ((int *) var1)[17] = var8;
  ((int *) var1)[19] = var9;
  if (var11 != 0x00000000)
  {
    var67 = ((int *) var11)[0];
    var68 = ((int *) var67)[50];
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    var71 var72 = (*var68) (var11, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var12 = ((int *) var1)[4];
  }
  else
  {
    var12 = ((int *) var1)[4];
  }
  if (var12 == 0x00000000)
  {
    var35 = ((int *) var1)[6];
  }
  else
  {
    var13 = ((int *) var1)[10];
    var14 = sp + 0x00000020;
    if (!(var13 == 0x00001000))
    {
      var15 = 0x42900000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 16($sp);"
        : 
        : "=r"(0x42900000), "=r"(sp));
      var16 = 0x42200000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x42200000));
      var17 = sp + 0x00000010;
      var18 = sp;
      __asm__ ("swc1       $fpr00, 20($sp);"
        : 
        : "=r"(sp));
      var19 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[6] = 0x00000000;
      __asm__ ("swc1       $fpr00, 28($sp);"
               "swc1       $fpr00, 32($sp);"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      scePaf_9F44CF86 (var18, var17, var14);
      var22 = sp;
      var23 = ((int *) var1)[4];
      __asm__ ("mov.s      $fpr12, $fpr20;");
      __asm__ ("mov.s      $fpr13, $fpr21;");
      scePaf_6F0AF8FE (var23, var22);
    }
    var26 = ((int *) var1)[4];
    var27 = 0xC2080000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0xC2080000), "=r"(sp));
    var28 = 0x41E80000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;"
             "swc1       $fpr00, 36($sp);"
      : 
      : "=r"(0x41E80000), "=r"(sp));
    var29 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    scePaf_E079C92B (var26, var14);
    __asm__ ("mtc1       $zr, $fpr12;");
    var32 = ((int *) var1)[4];
    __asm__ ("mov.s      $fpr13, $fpr20;");
    __asm__ ("mov.s      $fpr14, $fpr21;");
    scePaf_D4E25D69 (var32);
    var35 = ((int *) var1)[6];
  }
  if (var35 != 0x00000000)
  {
    var57 = ((int *) var35)[0];
    var58 = 0x42900000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0x42900000), "=r"(sp));
    var59 = 0x42200000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42200000));
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    var60 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var61 = sp + 0x00000020;
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var62 = ((int *) var57)[50];
    __asm__ ("swc1       $fpr00, 44($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    var65 var66 = (*var62) (var35, 0x01000004, 0x00000004, var61);
    var36 = ((int *) var1)[5];
  }
  else
  {
    var36 = ((int *) var1)[5];
  }
  if (var36 != 0x00000000)
  {

  label36:
    __asm__ ("mtc1       $zr, $fpr0;"
             "c.eq.s     $fpr20, $fpr00;");
    __asm__ ("bc1f       0x00009154;"
             "mov.s      $fpr12, $fpr20;");
    {
      var37 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42A00000));
    }
    ((int *) sp)[8] = 0x00000000;
    var38 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var39 = ((int *) var36)[0];
    ((int *) sp)[9] = 0x00000000;
    var40 = sp + 0x00000020;
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[10] = 0x00000000;
    var41 = ((int *) var39)[50];
    __asm__ ("lwc1       $fpr13, 32($sp);");
    var44 var45 = (*var41) (var36, 0x01000003, 0x00000000, var40);
    var46 = ((int *) var1)[3];
  }
  else
  {
    var36 = ((int *) var1)[2];
    if (!(var36 == 0x00000000))
      goto label36;
    var46 = ((int *) var1)[3];
  }
  if (var46 != 0x00000000)
  {
    var49 = ((int *) var46)[0];
    var50 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[11] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var51 = ((int *) var49)[50];
    __asm__ ("swc1       $fpr00, 32($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    var52 = sp + 0x00000020;
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 40($sp);"
      : 
      : "=r"(sp));
    var55 var56 = (*var51) (var46, 0x01000002, 0x00000000, var52);
    ra = ((int *) sp)[14];
  }
  else
  {
    ra = ((int *) sp)[14];
  }
  var47 = ((int *) sp)[13];
  var48 = ((int *) sp)[12];
  __asm__ ("lwc1       $fpr21, 68($sp);"
           "lwc1       $fpr20, 64($sp);");
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000929C
 */
void vsh_3C10C342 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr22, 40($sp);"
           "mov.s      $fpr22, $fpr13;"
           "swc1       $fpr21, 36($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000003;
  __asm__ ("mov.s      $fpr21, $fpr12;");
  if (var2 == 0x00000001)
  {
    sub_09D3C (arg1);
  }
  __asm__ ("mtc1       $zr, $fpr20;");
  var3 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(0xC3280000), "=r"(sp));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr20, 4($sp);"
           "swc1       $fpr20, 8($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[0];
  var9 = ((int *) var1)[1];
  ((int *) var1)[17] = var5;
  ((int *) var1)[16] = var8;
  ((int *) var1)[18] = var6;
  ((int *) var1)[19] = var7;
  if (var9 != 0x00000000)
  {
    var33 = ((int *) var9)[0];
    var34 = ((int *) var33)[50];
    __asm__ ("mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr22;");
    var37 var38 = (*var34) (var9, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var10 = ((int *) var1)[5];
  }
  else
  {
    var10 = ((int *) var1)[5];
  }
  if (var10 != 0x00000000)
  {

  label14:
    __asm__ ("c.eq.s     $fpr21, $fpr20;");
    __asm__ ("bc1f       0x00009350;"
             "mov.s      $fpr12, $fpr21;");
    {
      var11 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42A00000));
    }
    ((int *) sp)[0] = 0x00000000;
    var12 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var13 = ((int *) var10)[0];
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    var14 = sp;
    ((int *) sp)[2] = 0x00000000;
    var15 = ((int *) var13)[50];
    __asm__ ("lwc1       $fpr13, 0($sp);");
    var18 var19 = (*var15) (var10, 0x01000003, 0x00000000, var14, arg5, arg6, arg7, arg8);
    var20 = ((int *) var1)[3];
  }
  else
  {
    var10 = ((int *) var1)[2];
    if (!(var10 == 0x00000000))
      goto label14;
    var20 = ((int *) var1)[3];
  }
  if (var20 != 0x00000000)
  {
    var25 = ((int *) var20)[0];
    var26 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[3] = 0x00000000;
    __asm__ ("swc1       $fpr00, 0($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr22;"
      : 
      : "=r"(sp));
    var27 = ((int *) var25)[50];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var28 = sp;
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var31 var32 = (*var27) (var20, 0x01000002, 0x00000000, var28);
    var21 = ((int *) var1)[4];
  }
  else
  {
    var21 = ((int *) var1)[4];
  }
  if (var21 != 0x00000000)
  {
    __asm__ ("mov.s      $fpr13, $fpr21;");
    __asm__ ("mtc1       $zr, $fpr12;");
    __asm__ ("mov.s      $fpr14, $fpr22;");
    scePaf_D4E25D69 (var21);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var22 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr22, 40($sp);"
           "lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00009450
 */
void sub_09450 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr12;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var2 = ((int *) arg1)[4];
  __asm__ ("mov.s      $fpr20, $fpr13;");
  if (var2 != 0x00000000)
  {
    var35 = ((int *) var2)[0];
    var36 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var37 = ((int *) var35)[50];
    var38 = sp;
    var41 var42 = (*var37) (var2, 0x01000005, 0x00000004, var38, arg5, arg6, arg7, arg8);
    var3 = ((int *) var1)[6];
  }
  else
  {
    var3 = ((int *) var1)[6];
  }
  if (var3 != 0x00000000)
  {
    var27 = ((int *) var3)[0];
    var28 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr20;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var29 = ((int *) var27)[50];
    var30 = sp;
    var33 var34 = (*var29) (var3, 0x01000005, 0x00000004, var30, arg5, arg6, arg7, arg8);
    var4 = ((int *) var1)[5];
  }
  else
  {
    var4 = ((int *) var1)[5];
  }
  if (var4 != 0x00000000)
  {
    var19 = ((int *) var4)[0];

  label17:
    var20 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr20;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var21 = ((int *) var19)[50];
    var22 = sp;
    var25 var26 = (*var21) (var5, 0x01000003, 0x00000000, var22, arg5, arg6, arg7, arg8);
    var6 = ((int *) var1)[3];
  }
  else
  {
    var5 = ((int *) var1)[2];
    if (var5 != 0x00000000)
    {
      var19 = ((int *) var5)[0];
      goto label17;
    }
    else
    {
      var6 = ((int *) var1)[3];
    }
  }
  if (var6 != 0x00000000)
  {
    var11 = ((int *) var6)[0];
    var12 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[3] = 0x00000000;
    __asm__ ("swc1       $fpr00, 0($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr20;"
      : 
      : "=r"(sp));
    var13 = ((int *) var11)[50];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var14 = sp;
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var17 var18 = (*var13) (var6, 0x01000002, 0x00000000, var14, arg5, arg6, arg7, arg8);
    var7 = ((int *) var1)[1];
  }
  else
  {
    var7 = ((int *) var1)[1];
  }
  if (var7 != 0x00000000)
  {
    __asm__ ("add.s      $fpr12, $fpr21, $fpr20;");
    scePaf_DE0E0F8B (var7, 0x0000006F, 0x000095E4, var1);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var8 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000095E4
 */
void sub_095E4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp;
  var2 = arg4;
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s0;
  var3 = ((int *) arg4)[4];
  if (var3 != 0x00000000)
  {
    var14 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    scePaf_41D027B0 (var3, var1);
    var19 = scePaf_ED055C3C (var3, 0x01000005);
    var4 = ((int *) var2)[6];
  }
  else
  {
    var4 = ((int *) var2)[6];
  }
  var5 = sp;
  if (var4 != 0x00000000)
  {
    var8 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    scePaf_41D027B0 (var4, var5);
    var13 = scePaf_ED055C3C (var4, 0x01000005);
    ra = ((int *) sp)[6];
  }
  else
  {
    ra = ((int *) sp)[6];
  }
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009694
 */
int vsh_04A37A04 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  var1 = 0xFFFFFC18;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var2 = arg1;
  ((int *) sp)[7] = ra;
  var3 = ((int *) arg1)[6];
  var4 = arg2;
  if (!(var3 == 0x00000000))
  {
    var7 = scePaf_C60EF86C (var3, 0x00000000);
    var1 = 0xFFFFFC17;
    if (!((var7 & 0x000000FF) != 0x00000000))
    {
      var8 = ((int *) var2)[6];
      var9 = ((int *) var4)[0];
      var10 = ((int *) var8)[0];
      var11 = ((int *) var10)[27];
      var14 var15 = (*var11) (var8, 0x0000000D, ((0x00000000 < var9)));
      var16 = ((int *) var4)[0];
      var17 = sp;
      if (var16 == 0x00000000)
      {

      label10:
        sub_32348 (var17, 0x00000000);
        var31 = ((int *) var2)[6];
        var32 = sp;
        var35 = scePaf_80885EEA (var31, var32);
        var36 = ((int *) sp)[0];
        if (!(var36 == 0x00000000))
        {
          scePaf_65FDC4C5 (var36);
        }

      label21:
        var23 = ((int *) var2)[6];
        if ((arg3 & 0x000000FF) == 0x00000000)
        {
        }
        else
        {
        }
        scePaf_46B3EE71 (var23, 0x00000011);
        var1 = 0x00000000;
      }
      else
      {
        var18 = ((int *) var16)[4];
        if (((0x0007D000 < var18)) != 0x00000000)
          goto label10;
        var19 = ((int *) var2)[6];
        var22 = scePaf_80885EEA (var19, var4);
        var1 = 0xFFFFFC16;
        if (!(var22 < 0))
          goto label21;
      }
    }
  }
  ra = ((int *) sp)[7];
  var26 = ((int *) sp)[6];
  var27 = ((int *) sp)[5];
  var28 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x00009794
 */
void vsh_5D12399C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = 0xFFFFFC18;
  ((int *) sp)[4] = s0;
  var2 = arg1;
  ((int *) sp)[6] = ra;
  var3 = ((int *) arg1)[6];
  var4 = arg2;
  if (!(var3 == 0x00000000))
  {
    var7 = scePaf_C60EF86C (var3, 0x00000000);
    var1 = 0xFFFFFC17;
    if (!((var7 & 0x000000FF) != 0x00000000))
    {
      var8 = ((int *) var4)[0];
      var9 = sp;
      if (var8 == 0x00000000)
      {

      label8:
        sub_32368 (var9, 0x00000000);
        var18 = ((int *) var2)[6];
        var19 = sp;
        scePaf_F88B0631 (var18, var19);
        var22 = ((int *) sp)[0];
        if (var22 == 0x00000000)
        {
          var1 = 0x00000000;
        }
        else
        {
          scePaf_65FDC4C5 (var22);
          var1 = 0x00000000;
        }
      }
      else
      {
        var10 = ((int *) var8)[4];
        if (((0x0007D000 < var10)) != 0x00000000)
          goto label8;
        var11 = ((int *) var2)[6];
        scePaf_F88B0631 (var11, var4);
        var1 = 0x00000000;
      }
    }
  }
  ra = ((int *) sp)[6];
  var14 = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009848
 */
void vsh_DA00CA52 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var2 = ((int *) arg2)[0];
  var3 = arg1;
  if (var2 == 0x00000000)
  {
    var5 = 0x00000000;
  }
  else
  {
    var4 = ((int *) var2)[18];
    var5 = 0x00000001;
    if (!(var4 != 0x00000000))
    {
      var6 = ((int *) var2)[20];
      var5 = 0x00000000;
      if (!(var6 == 0x00000000))
      {
        var5 = 0x00000001;
      }
    }
  }
  if (((arg3 < 0x00000008)) == 0x00000000)
  {

  label56:

  label57:
  }
  else
  {
    var7 = ((int *) ((arg3 << 0x00000002) + 0x00041E44))[0];
    switch () {
    case 0:
      var8 = ((int *) var3)[5];
      if (var8 != 0x00000000)
      {
        var27 = ((int *) var8)[0];
        var28 = ((int *) var27)[43];
        var31 var32 = (*var28) (var8, var1, 0x00000000, arg4, arg5, arg6, arg7, arg8);
        var20 = ((int *) var3)[5];

      label52:
        var21 = ((int *) var20)[0];
        var22 = ((int *) var21)[27];

      label53:
        var25 var26 = (*var22) (var20, 0x0000000D, var5);
      }
      else
      {
        var9 = ((int *) var3)[2];
        if (!(var9 != 0x00000000))
          goto label56;
        var14 = ((int *) var9)[0];
        var15 = ((int *) var14)[43];
        var18 var19 = (*var15) (var9, var1, 0x00000000, arg4, arg5, arg6, arg7, arg8);
        var20 = ((int *) var3)[2];
        goto label52;
      }
    case 1:
      var33 = ((int *) var3)[3];
      if (var33 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var34 = ((int *) var33)[0];
        var35 = ((int *) var34)[43];
        var38 var39 = (*var35) (var33, var1, 0x00000000, arg4, arg5, arg6, arg7, arg8);
        var20 = ((int *) var3)[3];
        goto label52;
      }
    case 2:
      var40 = ((int *) var3)[4];
      if (var40 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var41 = ((int *) var40)[0];
        var42 = ((int *) var3)[10];
        var43 = ((int *) var41)[32];
        var46 var47 = (*var43) (var40, 0x00000000, 0x0000001A, (!((var42 ^ 0x00001000)) ? 0x00000000 : 0x00000003), arg5, arg6, arg7, arg8);
        var48 = ((int *) var3)[4];
        var49 = ((int *) var48)[0];
        var50 = ((int *) var49)[43];
        var53 var54 = (*var50) (var48, var1, 0x00000000);
        var20 = ((int *) var3)[4];
        goto label52;
      }
    case 3:
      var55 = ((int *) var3)[4];
      if (var55 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var56 = ((int *) var55)[0];
        var57 = ((int *) var3)[10];
        var58 = ((int *) var56)[32];
        var61 var62 = (*var58) (var55, 0x00000007, 0x0000001A, (!((var57 ^ 0x00001000)) ? 0x00000000 : 0x00000003), arg5, arg6, arg7, arg8);
        var63 = ((int *) var3)[4];

      label28:
        var64 = ((int *) var63)[0];

      label29:
        var22 = ((int *) var64)[43];
        goto label53;
      }
    case 4:
      var65 = ((int *) var3)[6];
      if (var65 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var64 = ((int *) var65)[0];
        goto label29;
      }
    case 5:
      var66 = ((int *) var3)[4];
      if (var66 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var67 = ((int *) var66)[0];
        var68 = ((int *) var3)[10];
        var69 = ((int *) var67)[32];
        var72 var73 = (*var69) (var66, 0x0000000E, 0x0000001A, (!((var68 ^ 0x00001000)) ? 0x00000000 : 0x00000003), arg5, arg6, arg7, arg8);
        var63 = ((int *) var3)[4];
        goto label28;
      }
    case 6:
      var74 = ((int *) var3)[4];
      if (var74 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var64 = ((int *) var74)[0];
        goto label29;
      }
    case 7:
      var75 = ((int *) var3)[4];
      if (var75 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var64 = ((int *) var75)[0];
        goto label29;
      }
    }
  }
  ra = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009AA4
 */
void sub_09AA4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (arg3 == 0x00000008)
  {
    var2 = ((int *) arg1)[4];

  label7:
    if (var2 == 0x00000000)
    {

    label11:
    }
    else
    {
      var3 = ((int *) var2)[0];
      var4 = ((int *) var3)[45];
      var7 var8 = (*var4) (var2, arg2, 0x00000005, arg4, arg5, arg6, arg7, arg8);
    }
  }
  else
  {
    if (!(arg3 == 0x00000009))
      goto label11;
    var2 = ((int *) arg1)[4];
    goto label7;
  }
  ra = ((int *) sp)[1];
  var1 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00009B10
 */
void sub_09B10 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = ra;
  var1 = ((int *) arg1)[4];
  ra = ((int *) sp)[8];
  if (!(var1 == 0x00000000))
  {
    var2 = ((int *) arg1)[11];
    if (var2 == 0x00000002)
    {
      var12 = 0xC2080000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC2080000), "=r"(sp));
      var13 = 0x41E80000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x41E80000));
      var14 = ((int *) arg1)[4];
    }
    else
    {
      var3 = 0xC2800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC2800000), "=r"(sp));
      var4 = 0x42480000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x42480000));
      var5 = ((int *) arg1)[4];
    }
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var6 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var7 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var8 = sp + 0x00000010;
    var9 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[2] = 0x00000000;
    __asm__ ("swc1       $fpr00, 16($sp);"
             "swc1       $fpr00, 20($sp);"
             "swc1       $fpr00, 24($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    scePaf_84551560 (var5, arg2, arg3, var7, var8, 0x0000003C, 0x0000001E);
    ra = ((int *) sp)[8];
  }
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00009BB8
 */
void sub_09BB8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[4];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label15:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[10];
    ra = ((int *) sp)[5];
    if (!(var3 == 0x00001000))
    {
      var4 = 0x3F000000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3F000000));
      if ((arg2 & 0x000000FF) == 0x00000000)
      {
        scePaf_164FFBB8 (var1);
        ra = ((int *) sp)[5];
      }
      else
      {
        scePaf_10882478 (var1);
        var7 = ((int *) var2)[11];
        if (var7 == 0x00000002)
        {
          var16 = 0xC2080000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC2080000), "=r"(sp));
          var17 = 0x41E80000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x41E80000));
        }
        else
        {
          var8 = 0xC2800000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC2800000), "=r"(sp));
          var9 = 0x42480000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x42480000));
        }
        __asm__ ("mtc1       $zr, $fpr12;");
        var10 = ((int *) var2)[4];
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var11 = sp;
        var12 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mov.s      $fpr13, $fpr12;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_E079C92B (var10, var11);
        goto label15;
      }
    }
  }
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009C88
 */
void vsh_794760F5 (int arg1, int arg2, int arg3)
{
  ((int *) arg1)[8] = arg3;
  ((int *) arg1)[7] = arg2;
  return;
}

/**
 * Subroutine at address 0x00009C94
 */
int vsh_1004B7DC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = 0x00000000;
  ((int *) sp)[5] = ra;
  var2 = ((int *) arg1)[11];
  if (((var2 < 0x00000002)) == 0x00000000)
  {

  label16:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[2];
    var4 = sp;
    if (var3 != 0x00000000)
    {
      sub_32328 (var4, 0x00000000);
      var8 = ((int *) arg1)[2];
      var9 = sp;
      var10 = ((int *) var8)[0];
      var11 = ((int *) var10)[44];
      var14 var15 = (*var11) (var8, var9, 0x00000000);
      var16 = ((int *) sp)[0];
      var1 = 0x00000000;
      if (var16 == 0x00000000)
        goto label16;
      var1 = 0x00000001;
      if (var16 == 0x00000000)
        goto label16;
      var17 = ((int *) var16)[1];
      var18 = var17 + 0xFFFFFFFF;
      ((int *) var16)[1] = var18;
      if (var18 <= 0)
      {
        var19 = ((int *) var16)[0];
        var20 = ((int *) var19)[1];
        var23 var24 = (*var20) (var16);
        var1 = 0x00000001;
        goto label16;
      }
      else
      {
        ra = ((int *) sp)[5];
      }
    }
    else
    {
      var1 = 0x00000000;
      goto label16;
    }
  }
  var5 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x00009D3C
 */
void sub_09D3C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  var4 = scePaf_A78805B0 ("system_plugin");
  if (var4 == 0x00000000)
  {

  label16:
    ra = ((int *) sp)[5];
  }
  else
  {
    var7 = scePaf_4E87FDFC (var4, 0x00000001);
    if (var7 == 0x00000000)
      goto label16;
    var8 = ((int *) var1)[9];
    var9 = sp;
    var10 = sp + 0x00000008;
    var11 = sp + 0x00000004;
    if (!(var8 != 0x00000000))
      goto label16;
    var13 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var14 = ((int *) var7)[10];
    __asm__ ("swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var17 var18 = (*var14) (var9, var11, var10, 0x00000000);
    var19 = sp;
    scePaf_E9DBEA88 (var19);
    var22 = ((int *) var1)[9];
    scePaf_F3D3570C (var22);
    ra = ((int *) sp)[5];
  }
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009DD4
 */
void sub_09DD4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  var4 = scePaf_A78805B0 ("system_plugin");
  if (var4 == 0x00000000)
  {

  label16:
    ra = ((int *) sp)[5];
  }
  else
  {
    var7 = scePaf_4E87FDFC (var4, 0x00000001);
    if (var7 == 0x00000000)
      goto label16;
    var8 = ((int *) var1)[9];
    var9 = sp;
    var10 = sp + 0x00000008;
    var11 = sp + 0x00000004;
    if (!(var8 != 0x00000000))
      goto label16;
    var13 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var14 = ((int *) var7)[10];
    __asm__ ("swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var17 var18 = (*var14) (var9, var11, var10, 0x0000001F);
    var19 = sp;
    scePaf_E9DBEA88 (var19);
    var22 = ((int *) var1)[9];
    scePaf_F3D3570C (var22);
    ra = ((int *) sp)[5];
  }
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009E6C
 */
void sub_09E6C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (arg3 == 0x00000000)
  {
    var1 = ((int *) arg1)[2];

  label6:
    if (var1 == 0x00000000)
    {

    label10:
      ra = ((int *) sp)[0];
    }
    else
    {
      var2 = ((int *) var1)[0];
      var3 = ((int *) var2)[30];
      var6 var7 = (*var3) (var1, 0x00000017, arg2, arg4, arg5, arg6, arg7, arg8);
      ra = ((int *) sp)[0];
    }
  }
  else
  {
    if (!(arg3 == 0x00000001))
      goto label10;
    var1 = ((int *) arg1)[3];
    goto label6;
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00009EC0
 */
int sub_09EC0 (int arg1)
{
  var1 = ((unsigned char *) arg1)[0];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label7:
    var7 = ((int *) var2)[1];
    var5 = !(((var7 < 0x00000100))) ? 0xFFFFFFFD : 0xFFFFFFFE;
    if (var7 == 0x00000100)
    {
      var8 = ((int *) var2)[50];
      var5 = !((var8 ^ 0x00000008)) ? 0x00000000 : 0xFFFFFFFF;
    }
  }
  else
  {
    var3 = ((unsigned char *) arg1)[1];
    if (var3 == 0x00000050)
    {
      goto label7;
    }
    else
    {
      var4 = ((unsigned char *) arg1)[2];
      var5 = 0xFFFFFFFF;
      if (var4 == 0x00000054)
        goto label7;
      var6 = ((unsigned char *) arg1)[3];
      if (!(var6 != 0x00000046))
        goto label7;
    }
  }
  return var5;
}

/**
 * Subroutine at address 0x00009F30
 */
int sub_09F30 (int arg1)
{
  var1 = 0x00000000;
  if (!(((arg1 < 0x00000005)) == 0x00000000))
  {
    var2 = ((int *) ((arg1 << 0x00000002) + 0x00041E64))[0];
    switch () {
    case 0:
      var1 = 0x00000003;
      goto label9;
    case 1:
      var1 = 0x00000001;
      goto label9;
    case 2:
      var1 = 0x00000008;
      goto label9;
    case 3:
      var1 = 0x00000036;
      goto label9;
    case 4:
      var1 = 0x00000004;
      goto label9;
    }
  }

label9:
  return var1;
}

/**
 * Subroutine at address 0x00009F84
 */
int vsh_F74A0E53 ()
{
  var1 = *((int *) 0x000471D0);
  return var1;
}

/**
 * Subroutine at address 0x00009F90
 */
void sub_09F90 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = sp;
  ((int *) sp)[10] = ra;
  ((int *) sp)[8] = s0;
  *((int *) 0x000471D0) = 0x00000000;
  sceVshCommonUtil_D87E8E2D (var1, "/CONFIG/SYSTEM/XMB/THEME");
  var4 = sp;
  var7 = sceVshCommonUtil_7A73DC84 (var4, "custom_theme_mode", 0x000471D0);
  var8 = *((int *) 0x000471D0);
  var9 = sp;
  var10 = (var7) ? 0x00000000 : var8;
  *((int *) 0x000471D0) = var10;
  sceVshCommonUtil_625A9A5D (var9);
  ra = ((int *) sp)[10];
  var13 = ((int *) sp)[9];
  var14 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00009FF8
 */
void vsh_C9498F8F (int arg1)
{
  var1 = 0xFFFFFFFF;
  if (!(((arg1 < 0x00000004)) == 0x00000000))
  {
    *((int *) 0x000471D0) = arg1;
    var1 = arg1;
  }
  return;
}

/**
 * Subroutine at address 0x0000A018
 */
void vsh_93DC5C48 (int arg1)
{
  sp = sp + 0xFFFFFF90;
  var1 = arg1;
  ((int *) sp)[24] = ra;
  var2 = sp;
  if (var1 == 0x00000001)
  {

  label7:
    var6 = IoFileMgrForUser_ACE946E8 ("flash1:/vsh/theme/custom_theme.dat", var3);
    ra = ((int *) sp)[24];
  }
  else
  {
    if (((var1 < 0x00000002)) != 0x00000000)
    {
      if (!(var1 == 0x00000000))
      {
      }

    label11:
      ra = ((int *) sp)[24];
    }
    else
    {
      var3 = sp;
      if (var1 == 0x00000002)
        goto label7;
      goto label11;
    }
  }
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0000A084
 */
void vsh_F2199B7D (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  if (!(arg1 == 0x00000000))
  {
    if (!(((0x000C0000 < arg2)) != 0x00000000))
    {
      var2 = 0xFFFFFFFF;
      var5 = scePaf_D86C4533 ("flash1:/vsh/theme/custom_theme.dat", 0x00037FF0);
      var6 = var5;
      if (!(var5 == 0x00000000))
      {
        var9 = scePaf_2A73D741 (arg1, 0x00000001, var1, var5);
        var2 = !((var1 ^ var9)) ? 0x00000000 : 0xFFFFFFFF;
      }
      if (!(var6 == 0x00000000))
      {
        var12 = scePaf_FFD71622 (var6);
      }
      if (var2 < 0)
      {
        var20 = IoFileMgrForUser_F27A9C51 ("flash1:/vsh/theme/custom_theme.dat");
      }
      else
      {
      }
    }
  }
  ra = ((int *) sp)[5];
  var13 = ((int *) sp)[4];
  var14 = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000A148
 */
int vsh_4B420C67 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[38] = s6;
  var1 = *((int *) 0x00045660);
  ((int *) sp)[34] = s2;
  var2 = arg1;
  ((int *) sp)[41] = ra;
  var3 = 0xFFFFFFFF;
  ((int *) sp)[40] = fp;
  ((int *) sp)[39] = s7;
  ((int *) sp)[37] = s5;
  ((int *) sp)[36] = s4;
  ((int *) sp)[35] = s3;
  ((int *) sp)[33] = s1;
  ((int *) sp)[32] = s0;
  if (!(var1 != 0xFFFFFFFF))
  {
    if (var2 == 0x00000000)
    {
    }
    scePaf_ACB55E4C (0x000471D4, var2, 0x00000100);
    var6 = sp + 0x00000020;
    var9 = IoFileMgrForUser_ACE946E8 (0x000471D4, var6);
    if (var9 < 0)
    {

    label69:
      scePaf_6439FDBC (0x000471D4, 0x00000000, 0x00000100);
      var3 = 0xFFFFFFFF;
    }
    else
    {
      if (arg2 != 0x00000000)
      {
        var86 = IoFileMgrForUser_109F50BC (0x000471D4, 0x40000001, 0x00000000);
        var87 = var86;
        if (!(var86 < 0))
        {
          var90 = scePspNpDrm_user_08D98894 (var86);
          var91 = var90;
          var86 = var87;
          if (var91 < 0)
          {
            IoFileMgrForUser_810C4BC3 (var87);
            var86 = var91;
          }
        }
        *((int *) 0x00045660) = var86;
      }
      else
      {
        var12 = IoFileMgrForUser_109F50BC (0x000471D4, 0x00000001, 0x00000000);
        *((int *) 0x00045660) = var12;
      }
      var13 = *((int *) 0x00045660);
      if (var13 < 0)
      {

      label62:
        *((int *) 0x00045660) = 0xFFFFFFFF;
        goto label69;
      }
      else
      {
        var16 = IoFileMgrForUser_6A638D83 (var13, 0x000472D4, 0x00000100);
        if (var16 != 0x00000100)
        {

        label39:
          var76 = *((int *) 0x00045660);
          IoFileMgrForUser_810C4BC3 (var76);
          *((int *) 0x00045660) = 0xFFFFFFFF;
          goto label69;
        }
        else
        {
          var19 = sub_09EC0 (0x000472D4);
          if (var19 < 0)
          {
            var79 = *((int *) 0x00045660);
            IoFileMgrForUser_810C4BC3 (var79);
            *((int *) 0x00045660) = 0xFFFFFFFF;
            scePaf_6439FDBC (0x000471D4, 0x00000000, 0x00000100);
            var3 = var19;
          }
          else
          {
            var20 = *((int *) 0x00045660);
            var21 = sp;
            var24 = IoFileMgrForUser_6A638D83 (var20, var21, 0x00000020);
            var25 = 0x00000000;
            if (var24 != 0x00000020)
              goto label39;
            var26 = 0x000473D4;
            var27 = 0x00000000;
            var28 = sp;
            while (1) {
              var29 = ((int *) var28)[0];
              if (var29 != 0x00000000)
              {
                var39 = ((int *) sp)[11];
                var40 = var29 >> 0x0000001F;
                if (((var39 < var40)) != 0x00000000)
                {
                  ((short *) var26)[0] = 0xFFFFFFFF;

                label94:
                  ((short *) var26)[1] = 0x00000000;
                  ((int *) var26)[1] = 0x00000000;

                label95:
                  var25 = var25 + 0x00000001;

                label96:
                  var28 = var28 + 0x00000004;
                  var27 = var27 + 0x00000020;
                  var26 = var26 + 0x00000020;
                  if (((var25 < 0x00000008)) != 0x00000000)
                    continue;
                  var3 = 0x00000000;
                }
                else
                {
                  var41 = var29 + 0x00000020;
                  if (var39 == var40)
                  {
                    var75 = ((int *) sp)[10];
                    if (((var75 < var29)) != 0x00000000)
                    {
                      ((short *) var26)[0] = 0xFFFFFFFF;
                      goto label94;
                    }
                    else
                    {
                      var41 = var29 + 0x00000020;

                    label51:
                      if (((var39 < 0x00000000)) != 0x00000000)
                      {
                        ((short *) var26)[0] = 0xFFFFFFFF;
                        goto label94;
                      }
                      else
                      {
                        var42 = ((int *) sp)[10];
                        if (var39 == 0x00000000)
                        {
                          var74 = *((int *) 0x00045660);
                          if (((var42 < var41)) == 0x00000000)
                          {

                          label57:
                            var46 var47 = IoFileMgrForUser_27EB27B8 (var43, 0x00000000, var29, var40, 0x00000000);
                            if (var46 < 0)
                              break;
                            var48 = *((int *) 0x00045660);
                            var51 = IoFileMgrForUser_6A638D83 (var48, var26, 0x00000020);
                            if (var51 != 0x00000020)
                            {
                              var66 = *((int *) 0x00045660);
                              IoFileMgrForUser_810C4BC3 (var66);
                              *((int *) 0x00045660) = 0xFFFFFFFF;
                              goto label69;
                            }
                            else
                            {
                              var52 = ((unsigned short *) var26)[0];
                              if (((var52 < 0x00000008)) == 0x00000000)
                              {

                              label92:
                                var65 = var27 + 0x000473D4;
                                ((int *) var65)[1] = 0x00000000;
                                ((short *) var65)[0] = 0xFFFFFFFF;
                                ((short *) var65)[1] = 0x00000000;
                                goto label95;
                              }
                              else
                              {
                                var53 = ((unsigned short *) var26)[1];
                                var56 = sub_09F30 (var25);
                                if (((var56 < var53)) != 0x00000000)
                                  goto label92;
                                var57 = ((int *) sp)[11];
                                var58 = ((int *) var26)[1];
                                if (((var57 < 0x00000000)) != 0x00000000)
                                  goto label92;
                                var59 = ((int *) sp)[10];
                                if (var57 == 0x00000000)
                                {
                                  if (((var59 < var58)) != 0x00000000)
                                    goto label92;

                                label80:
                                  var60 = ((int *) var26)[2];
                                  if (((var57 < 0x00000000)) != 0x00000000)
                                  {

                                  label91:
                                    goto label92;
                                  }
                                  else
                                  {
                                    var61 = ((int *) sp)[10];
                                    if (var57 == 0x00000000)
                                    {
                                      if (((var61 < var60)) != 0x00000000)
                                        goto label92;
                                      var62 = ((int *) var26)[1];

                                    label85:
                                      var63 = ((int *) var26)[2];
                                      if (((var57 < 0x00000000)) != 0x00000000)
                                      {
                                        goto label92;
                                      }
                                      else
                                      {
                                        if (var57 != 0x00000000)
                                        {
                                          var25 = var25 + 0x00000001;
                                        }
                                        else
                                        {
                                          var64 = ((int *) sp)[10];
                                          if (!(((var64 < (var62 + var63))) == 0x00000000))
                                            goto label91;
                                          var25 = var25 + 0x00000001;
                                        }
                                      }
                                    }
                                    else
                                    {
                                      var62 = ((int *) var26)[1];
                                      goto label85;
                                    }
                                  }
                                }
                                else
                                goto label80;
                              }
                              goto label96;
                            }
                          }
                          else
                          {
                            ((short *) var26)[0] = 0xFFFFFFFF;
                            goto label94;
                          }
                        }
                        else
                        {
                          var43 = *((int *) 0x00045660);
                          goto label57;
                        }
                      }
                    }
                  }
                  else
                  goto label51;
                }
              }
              else
              {
                ((short *) var26)[0] = 0xFFFFFFFF;
                goto label94;
              }
              goto label98;
            }
            var71 = *((int *) 0x00045660);
            IoFileMgrForUser_810C4BC3 (var71);
            goto label62;
          }
        }
      }
    }
  }

label98:
  ra = ((int *) sp)[41];
  var30 = ((int *) sp)[40];
  var31 = ((int *) sp)[39];
  var32 = ((int *) sp)[38];
  var33 = ((int *) sp)[37];
  var34 = ((int *) sp)[36];
  var35 = ((int *) sp)[35];
  var36 = ((int *) sp)[34];
  var37 = ((int *) sp)[33];
  var38 = ((int *) sp)[32];
  sp = sp + 0x000000B0;
  return var3;
}

/**
 * Subroutine at address 0x0000A530
 */
void vsh_6E3282C1 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = 0xFFFFFFFF;
  var2 = *((int *) 0x00045660);
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (!(var2 == 0xFFFFFFFF))
  {
    IoFileMgrForUser_810C4BC3 (var2);
    *((int *) 0x00045660) = 0xFFFFFFFF;
    scePaf_6439FDBC (0x000471D4, 0x00000000, 0x00000100);
    var1 = 0x00000000;
  }
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000A594
 */
int vsh_FACD4E39 (int arg1)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[27] = s3;
  var1 = 0xFFFFFFFF;
  var2 = *((int *) 0x00045660);
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  var3 = arg1;
  ((int *) sp)[28] = ra;
  ((int *) sp)[24] = s0;
  if (var2 == 0xFFFFFFFF)
  {

  label43:
    ra = ((int *) sp)[28];
  }
  else
  {
    if (((arg1 < 0x00000008)) == 0x00000000)
    {
      goto label43;
    }
    else
    {
      var4 = *((char *) 0x000471D4);
      if (var4 == 0x00000000)
        goto label43;
      var5 = sp;
      var8 = IoFileMgrForUser_ACE946E8 (0x000471D4, var5);
      if (var8 < 0)
      {
        var40 = *((int *) 0x00045660);
        IoFileMgrForUser_810C4BC3 (var40);
        *((int *) 0x00045660) = 0xFFFFFFFF;
        scePaf_6439FDBC (0x000471D4, 0x00000000, 0x00000100);
        var1 = 0xFFFFFFFF;
        goto label43;
      }
      else
      {
        var9 = (var3 << 0x00000005) + 0x000473D4;
        var10 = ((int *) var9)[1];
        var1 = 0xFFFFFFFF;
        if (var10 == 0x00000000)
          goto label43;
        var11 = ((unsigned short *) var9)[0];
        ra = ((int *) sp)[28];
        if (!(var11 != var3))
        {
          var14 = scePaf_6CEA048C (var10);
          var15 = var14;
          var1 = 0xFFFFFFFF;
          if (!(var14 == 0x00000000))
          {
            var16 = ((int *) var9)[2];
            var17 = ((int *) sp)[3];
            if (var16 == 0x00000000)
            {

            label39:
              scePaf_22FB4177 (var15);
              var1 = 0xFFFFFFFF;
            }
            else
            {
              var18 = var16 >> 0x0000001F;
              if (((var17 < var18)) != 0x00000000)
                goto label39;
              var19 = ((int *) sp)[2];
              if (var17 == var18)
              {
                if (((var19 < var16)) != 0x00000000)
                  goto label39;
                var20 = ((int *) var9)[1];

              label26:
                if (((var17 < 0x00000000)) != 0x00000000)
                  goto label39;
                var21 = ((int *) sp)[2];
                if (var17 == 0x00000000)
                {
                  var39 = *((int *) 0x00045660);
                  if (((var21 < (var20 + var16))) != 0x00000000)
                    goto label39;

                label31:
                  var25 var26 = IoFileMgrForUser_27EB27B8 (var22, 0x00000000, var16, var18, 0x00000000);
                  if (var25 < 0)
                  {
                    goto label39;
                  }
                  else
                  {
                    var27 = *((int *) 0x00045660);
                    var28 = ((int *) var9)[1];
                    var31 = IoFileMgrForUser_6A638D83 (var27, var15, var28);
                    var32 = ((int *) var9)[1];
                    if (var31 != var32)
                    {
                      goto label39;
                    }
                    else
                    {
                      ((int *) ((var3 << 0x00000002) + 0x000474D4))[0] = var15;
                      var1 = 0x00000000;
                    }
                  }
                }
                else
                {
                  var22 = *((int *) 0x00045660);
                  goto label31;
                }
              }
              else
              {
                var20 = ((int *) var9)[1];
                goto label26;
              }
            }
          }
          goto label43;
        }
      }
    }
  }
  var33 = ((int *) sp)[27];
  var34 = ((int *) sp)[26];
  var35 = ((int *) sp)[25];
  var36 = ((int *) sp)[24];
  sp = sp + 0x00000080;
  return var1;
}

/**
 * Subroutine at address 0x0000A73C
 */
void vsh_288E498D (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg1;
  var2 = (arg1 << 0x00000005) + 0x000473D4;
  ((int *) sp)[1] = ra;
  var3 = 0xFFFFFFFF;
  ((int *) sp)[0] = s0;
  if (!(((arg1 < 0x00000008)) == 0x00000000))
  {
    var4 = ((int *) var2)[1];
    if (var4 == 0x00000000)
    {
    }
    else
    {
      var5 = ((unsigned short *) var2)[0];
      var6 = (var1 << 0x00000002) + 0x000474D4;
      var3 = 0xFFFFFFFF;
      if (!(var5 != var1))
      {
        var7 = ((int *) var6)[0];
        if (!(var7 == 0x00000000))
        {
          scePaf_22FB4177 (var7);
          ((int *) var6)[0] = 0x00000000;
          var3 = 0x00000000;
        }
      }
    }
  }
  ra = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000A7BC
 */
int vsh_B8FE68B2 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_0AC1C (arg1, arg2);
  var4 = 0xFFFFFFFF;
  if (!(var3 == 0x00000000))
  {
    scePaf_3447707B (arg3, var3, 0x00000020);
    var4 = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0000A804
 */
int sub_0A804 (int arg1, int arg2, int arg3)
{
  ((int *) arg3)[4] = 0x00000003;
  var1 = 0xFFFFFFFF;
  ((int *) arg3)[5] = 0x00000005;
  if (!(((arg1 < 0x00000005)) == 0x00000000))
  {
    var2 = ((int *) ((arg1 << 0x00000002) + 0x00041E78))[0];
    switch () {
    case 0:
      var3 = 0x00000010;
      if (arg2 == 0x00000000)
      {
        ((int *) arg3)[3] = 0x00000010;
        ((int *) arg3)[0] = 0x00000010;
        ((int *) arg3)[1] = 0x00000010;

      label13:
        ((int *) arg3)[2] = var3;
      }
      else
      {
        if (arg2 == 0x00000001)
        {
          var4 = 0x0000012C;
          var5 = 0x000000AA;
          ((int *) arg3)[4] = 0xFFFFFF9C;

        label17:
          ((int *) arg3)[2] = var4;
          ((int *) arg3)[3] = var5;
          ((int *) arg3)[0] = var4;
          ((int *) arg3)[1] = var5;
        }
      }

    label18:
      var1 = 0x00000000;
      goto label19;
    case 1:
      ((int *) arg3)[5] = 0x00000004;
      var4 = 0x000001E0;
      var5 = 0x00000110;
      goto label17;
    case 2:
      ((int *) arg3)[3] = 0x00000030;
      ((int *) arg3)[1] = 0x00000010;
      ((int *) arg3)[2] = 0x00000040;
      ((int *) arg3)[0] = 0x00000010;
      goto label18;
    case 3:
      ((int *) arg3)[1] = 0x00000010;
      ((int *) arg3)[0] = 0x00000010;
      var3 = 0x00000040;
      if (!((arg2 & 0x00000001) != 0x00000000))
      {
        var3 = 0x00000030;
      }

    label8:
      ((int *) arg3)[3] = var3;
      goto label13;
    case 4:
      ((int *) arg3)[1] = 0x00000010;
      ((int *) arg3)[0] = 0x00000010;
      var3 = 0x00000020;
      if (!((arg2 & 0x00000001) == 0x00000000))
      {
        var3 = 0x00000030;
      }
      goto label8;
    }
  }

label19:
  return var1;
}

/**
 * Subroutine at address 0x0000A908
 */
int vsh_C6387EF9 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  ((int *) sp)[13] = ra;
  var3 = sub_0AC1C (arg1, arg2);
  var4 = var3;
  var5 = 0xFFFFFFFF;
  if (!(var3 == 0x00000000))
  {
    var6 = sp;
    var7 = var3 + 0x00000020;
    if ((arg4 & 0x000000FF) == 0x00000000)
    {

    label12:
      var15 = ((int *) var4)[2];
      scePaf_3447707B (arg3, var7, var15);
      var5 = 0x00000000;
    }
    else
    {
      var10 = sub_0A804 (arg1, arg2, var6);
      var11 = sp;
      var5 = 0xFFFFFFFF;
      if (!(var10 < 0))
      {
        var14 = sub_0B190 (var7, var4, var11);
        var5 = 0xFFFFFFFF;
        if (!(var14 < 0))
          goto label12;
      }
    }
  }
  ra = ((int *) sp)[13];
  var18 = ((int *) sp)[12];
  var19 = ((int *) sp)[11];
  var20 = ((int *) sp)[10];
  var21 = ((int *) sp)[9];
  var22 = ((int *) sp)[8];
  sp = sp + 0x00000040;
  return var5;
}

/**
 * Subroutine at address 0x0000A9BC
 */
int vsh_0732F306 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[21] = s1;
  var1 = arg3;
  var2 = sp;
  ((int *) sp)[24] = s4;
  ((int *) sp)[23] = s3;
  var3 = arg2;
  ((int *) sp)[22] = s2;
  var4 = arg1;
  ((int *) sp)[25] = ra;
  ((int *) sp)[20] = s0;
  var7 = vsh_B8FE68B2 (arg1, arg2, var2);
  var8 = 0xFFFFFFFF;
  if (!(var7 < 0))
  {
    var9 = ((int *) sp)[2];
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    var12 = scePaf_31AC0624 (0x00000010, var9);
    var13 = var12;
    if (var12 == 0x00000000)
    {

    label28:
      var44 = ((int *) sp)[8];

    label29:
      if (var44 != 0x00000000)
      {
        var45 = ((int *) sp)[9];
        var48 var49 = (*var44) (var45);
        var8 = 0xFFFFFFFF;
      }
      else
      {
        var8 = 0xFFFFFFFF;
      }
    }
    else
    {
      ((int *) sp)[8] = 0x0000ACE8;
      ((int *) sp)[9] = var13;
      var16 = vsh_C6387EF9 (var4, var3, var12, 0x00000000);
      var17 = ((unsigned short *) sp)[3];
      if (var16 < 0)
        goto label28;
      var18 = ((int *) sp)[3];
      if (var17 == 0x00000001)
      {
        var22 = scePaf_BFEF859E (var1, var18, var13, 0x00000000);
      }
      else
      {
        var19 = ((int *) sp)[2];
        var22 = scePaf_D6E29A9E (var1, var18, var13, var19);
      }
      if (var22 < 0)
      {
        var44 = ((int *) sp)[8];
        goto label29;
      }
      else
      {
        var23 = ((int *) sp)[8];
        var24 = sp + 0x00000030;
        if ((arg4 & 0x000000FF) != 0x00000000)
        {
          var38 = sub_0A804 (var4, var3, var24);
          if (var38 < 0)
            goto label28;
          var39 = sp;
          ((short *) sp)[3] = 0x00000000;
          var42 = sub_0B190 (var1, var39, var24);
          if (var42 >= 0)
          {
            var25 = ((int *) sp)[8];

          label35:
            if (var25 != 0x00000000)
            {
              var31 = ((int *) sp)[9];
              var34 var35 = (*var25) (var31);
              var8 = 0x00000000;
            }
            else
            {
              var8 = 0x00000000;
            }
          }
          else
          {
            var43 = ((int *) sp)[8];
            goto label28;
          }
        }
        else
        {
          var25 = ((int *) sp)[8];
          goto label35;
        }
      }
    }
  }
  ra = ((int *) sp)[25];
  var26 = ((int *) sp)[24];
  var27 = ((int *) sp)[23];
  var28 = ((int *) sp)[22];
  var29 = ((int *) sp)[21];
  var30 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return var8;
}

/**
 * Subroutine at address 0x0000AB1C
 */
void vsh_CD20B748 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[13] = s1;
  var1 = arg2;
  ((int *) sp)[15] = s3;
  var2 = arg1;
  ((int *) sp)[14] = s2;
  var3 = sp;
  ((int *) sp)[16] = s4;
  ((int *) sp)[17] = ra;
  ((int *) sp)[12] = s0;
  var6 = vsh_B8FE68B2 (var1, arg3, var3);
  var7 = ((int *) sp)[2];
  if (var6 < 0)
  {
    sub_32328 (var2, 0x00000000);
  }
  else
  {
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    var10 = scePaf_31AC0624 (0x00000010, var7);
    var11 = var10;
    if (var10 == 0x00000000)
    {

    label14:
      sub_32328 (var2, 0x00000000);
      var18 = ((int *) sp)[8];
    }
    else
    {
      ((int *) sp)[8] = 0x0000ACE8;
      ((int *) sp)[9] = var11;
      var14 = vsh_C6387EF9 (var1, arg3, var10, 0x00000001);
      if (var14 < 0)
        goto label14;
      var15 = sp;
      sub_0AD50 (var2, arg4, var11, var15);
      var18 = ((int *) sp)[8];
    }
    if (var18 != 0x00000000)
    {
      var24 = ((int *) sp)[9];
      var27 var28 = (*var18) (var24);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[17];
  var19 = ((int *) sp)[16];
  var20 = ((int *) sp)[15];
  var21 = ((int *) sp)[14];
  var22 = ((int *) sp)[13];
  var23 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000AC1C
 */
int sub_0AC1C (int arg1, int arg2)
{
  var1 = arg1;
  var2 = 0x00000000;
  if (!(((arg1 < 0x00000008)) == 0x00000000))
  {
    if (!(arg2 < 0))
    {
      var3 = (arg1 << 0x00000005) + 0x000473D4;
      var4 = ((int *) var3)[1];
      var2 = 0x00000000;
      if (!(var4 == 0x00000000))
      {
        var5 = ((unsigned short *) var3)[0];
        if (!(var5 != var1))
        {
          var6 = ((int *) ((var1 << 0x00000002) + 0x000474D4))[0];
          var2 = 0x00000000;
          if (!(var6 == 0x00000000))
          {
            var7 = ((unsigned short *) var3)[1];
            var8 = var6;
            var9 = 0x00000000;
            if (var7 == 0x00000000)
            {

            label10:
              var2 = 0x00000000;
            }
            else
            {
              var10 = ((int *) var8)[2];
              while (1) {
                var9 = var9 + 0x00000001;
                var11 = var8;
                var8 = var8 + (var10 + 0x00000020);
                if ((var10 & 0x00000003) != 0x00000000)
                  break;
                var12 = ((int *) var11)[0];
                if (var12 == arg2)
                {
                  var13 = ((unsigned short *) var11)[3];

                label18:
                  var2 = (var13) ? var11 : 0x00000000;
                }
                else
                {
                  if (((var9 < var7)) != 0x00000000)
                  {
                    var10 = ((int *) var8)[2];
                    continue;
                  }
                  else
                  {
                    if (0x00000000 == 0x00000000)
                    {
                      var2 = 0x00000000;
                    }
                    else
                    {
                      var13 = ((unsigned short *) var11)[3];
                      goto label18;
                    }
                  }
                }
                goto label19;
              }
              goto label10;
            }
          }
        }
      }
    }
  }

label19:
  return var2;
}

/**
 * Subroutine at address 0x0000ACE8
 */
void sub_0ACE8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_22FB4177 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000AD04
 */
int sub_0AD04 (int arg1, int arg2)
{
  var1 = 0x00000000;
  if (!(((arg2 < 0x00000010)) != 0x00000000))
  {
    var2 = ((int *) arg1)[0];
    if (var2 == 0x2E47494D)
    {
      var3 = ((int *) arg1)[1];
      if (!(var3 != 0x312E3030))
      {
        var4 = ((int *) arg1)[2];
        var1 = ((var4 ^ 0x00505350) < 0x00000001);
      }
    }
  }
  return var1;
}

/**
 * Subroutine at address 0x0000AD50
 */
void sub_0AD50 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[41] = s5;
  var1 = arg2;
  ((int *) sp)[40] = s4;
  var2 = arg1;
  var3 = sp;
  ((int *) sp)[37] = s1;
  var4 = arg3;
  ((int *) sp)[36] = s0;
  var5 = arg4;
  ((int *) sp)[43] = ra;
  ((int *) sp)[42] = s6;
  ((int *) sp)[39] = s3;
  ((int *) sp)[38] = s2;
  sub_32328 (var3, 0x00000000);
  if (var4 == 0x00000000)
  {
    sub_32328 (var2, 0x00000000);
    var16 = ((int *) sp)[0];
  }
  else
  {
    var8 = ((unsigned short *) var5)[3];
    ((int *) sp)[4] = 0x00000000;
    ((int *) sp)[5] = 0x00000000;
    if (var8 != 0x00000000)
    {
      var149 = ((int *) var5)[3];
      var152 = scePaf_31AC0624 (0x00000010, var149);
      var10 = var152;
      if (var152 == 0x00000000)
      {

      label110:
        var12 = var2;

      label111:
        sub_32328 (var12, 0x00000000);

      label113:
        var15 = ((int *) sp)[4];
      }
      else
      {
        var153 = ((unsigned short *) var5)[3];
        ((int *) sp)[4] = 0x0000ACE8;
        ((int *) sp)[5] = var10;
        if (var153 == 0x00000001)
        {
          var157 = scePaf_BFEF859E (var10, var149, var4, 0x00000000);
        }
        else
        {
          var154 = ((int *) var5)[2];
          var157 = scePaf_D6E29A9E (var10, var149, var4, var154);
        }
        var9 = var157;
        if (var157 >= 0)
        {

        label21:
          var11 = ((unsigned short *) var5)[2];
          if (var11 < 0)
            goto label110;
          if (((var11 < 0x00000005)) != 0x00000000)
          {
            goto label110;
          }
          else
          {
            if (!(var11 == 0x00000005))
              goto label110;
            var39 = sub_0AD04 (var10, var9);
            var12 = var2;
            if (var39 == 0x00000000)
              goto label111;
            var42 = scePaf_07A14F5B (var10, var9);
            var43 = ((int *) var42)[11];
            var44 = var42 + 0x0000002C;
            ((int *) sp)[12] = var43;
            var45 = var42;
            var46 = ((int *) var44)[1];
            ((int *) sp)[8] = var43;
            ((int *) sp)[9] = var46;
            ((int *) sp)[13] = var46;
            var49 var50 = scePaf_0A6D0925 (var42, 0x00000001);
            ((int *) sp)[17] = var50;
            ((int *) sp)[16] = var49;
            var51 = ((unsigned short *) var44)[36];
            var54 = scePaf_64A8F0B9 (0x00000068);
            var55 = var45 + 0x00000004;
            var56 = ((int *) var55)[2];
            var57 = var54;
            var58 = ((int *) var44)[14];
            ((int *) sp)[24] = var56;
            var59 = ((int *) var55)[3];
            var60 = ((int *) sp)[8];
            var61 = ((int *) sp)[9];
            ((int *) sp)[20] = var56;
            ((int *) sp)[25] = var59;
            ((int *) sp)[21] = var59;
            scePaf_A0E3AAE0 (var57, var1, var60, var61, var58, 0x00000002, 0x00000000, var59);
            var64 = sp;
            sub_32448 (var64, var57);
            var67 = ((int *) sp)[0];
            var68 = ((int *) var67)[18];
            var69 = ((int *) sp)[8];
            if (var68 != 0x00000000)
            {

            label41:
              var75 = ((int *) var44)[15];
              var78 = scePaf_336E37F3 (var67, var69);
              if (var51 == 0x00000000)
              {
                __asm__ ("break      0x00007;");
              }
              var79 = ((int *) sp)[16];
              scePaf_6D03433C (var67, 0x00000000, var79, var75, ((((var78 + var51) + 0xFFFFFFFF) / var51) * var51));
              var82 = ((int *) var44)[14];
              if ((((var82 + 0xFFFFFFFC) < 0x00000004)) != 0x00000000)
              {
                var93 var94 = scePaf_7DF2134C (var45, 0x00000001);
                ((int *) sp)[29] = var94;
                ((int *) sp)[28] = var93;
                if (var93 == 0x00000000)
                {

                label94:
                  var83 = var2;
                  if (!(var45 == 0x00000000))
                  {
                    scePaf_94E322DD (var45);
                    scePaf_4508F2FA (var45);
                    var83 = var2;
                  }
                  var88 = sp;
                  sub_32408 (var83, var88);
                  var15 = ((int *) sp)[4];
                }
                else
                {
                  var95 = sp + 0x00000080;
                  sub_32428 (var95, 0x00000000);
                  var98 = ((int *) var45)[31];
                  if (var98 < 0)
                  {

                  label68:
                    var99 = ((int *) sp)[32];
                  }
                  else
                  {
                    if (((var98 < 0x00000003)) != 0x00000000)
                    {
                      var146 = scePaf_5C068AD6 (0x00000024);
                      var147 = ((int *) sp)[29];
                      var148 = ((int *) var45)[31];
                      var139 = var146;

                    label63:
                      scePaf_96383E99 (var139, var1, var138, (var137 >> 0x00000002));
                      sub_324C0 (var95, var139);
                      var99 = ((int *) sp)[32];
                    }
                    else
                    {
                      if (!(var98 == 0x00000003))
                        goto label68;
                      var136 = scePaf_5C068AD6 (0x00000024);
                      var137 = ((int *) sp)[29];
                      var138 = ((int *) var45)[31];
                      var139 = var136;
                      goto label63;
                    }
                  }
                  if (var99 != 0x00000000)
                  {
                    var119 = ((int *) sp)[28];
                    scePaf_A151DD55 (var99, var119);
                    var122 = ((int *) sp)[0];
                    scePaf_D59E54BC (var122, var95);
                    var125 = ((int *) sp)[32];
                    if (!(var125 == 0x00000000))
                    {
                      var126 = ((int *) var125)[1];
                      var127 = var126 + 0xFFFFFFFF;
                      ((int *) var125)[1] = var127;
                      if (!(var127 > 0))
                      {
                        var128 = ((int *) var125)[0];
                        var129 = ((int *) var128)[1];
                        var132 var133 = (*var129) (var125);
                      }
                    }
                    goto label94;
                  }
                  else
                  {
                    var100 = sp;
                    sub_32448 (var100, 0x00000000);
                    var103 = var2;
                    if (!(var45 == 0x00000000))
                    {
                      scePaf_94E322DD (var45);
                      scePaf_4508F2FA (var45);
                      var103 = var2;
                    }
                    sub_32328 (var103, 0x00000000);
                    var110 = ((int *) sp)[32];
                    var15 = ((int *) sp)[4];
                    if (!(var110 == 0x00000000))
                    {
                      var111 = ((int *) var110)[1];
                      var112 = var111 + 0xFFFFFFFF;
                      ((int *) var110)[1] = var112;
                      if (var112 > 0)
                        goto label113;
                      var113 = ((int *) var110)[0];
                      var114 = ((int *) var113)[1];
                      var117 var118 = (*var114) (var110);
                      var15 = ((int *) sp)[4];
                    }
                  }
                }
              }
              else
              goto label94;
            }
            else
            {
              var70 = ((int *) var67)[20];
              if (var70 != 0x00000000)
                goto label41;
              if (var45 == 0x00000000)
              {
                var12 = var2;
              }
              else
              {
                scePaf_94E322DD (var45);
                scePaf_4508F2FA (var45);
                var12 = var2;
              }
              goto label111;
            }
          }
        }
        else
        {
          var12 = var2;
          goto label111;
        }
      }
    }
    else
    {
      var9 = ((int *) var5)[2];
      var10 = var4;
      goto label21;
    }
    if (var15 != 0x00000000)
    {
      var32 = ((int *) sp)[5];
      var35 var36 = (*var15) (var32);
      var16 = ((int *) sp)[0];
    }
    else
    {
      var16 = ((int *) sp)[0];
    }
  }
  if (!(var16 == 0x00000000))
  {
    var17 = ((int *) var16)[1];
    var18 = var17 + 0xFFFFFFFF;
    ((int *) var16)[1] = var18;
    if (var18 <= 0)
    {
      var26 = ((int *) var16)[0];
      var27 = ((int *) var26)[1];
      var30 var31 = (*var27) (var16);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[43];
  var19 = ((int *) sp)[42];
  var20 = ((int *) sp)[41];
  var21 = ((int *) sp)[40];
  var22 = ((int *) sp)[39];
  var23 = ((int *) sp)[38];
  var24 = ((int *) sp)[37];
  var25 = ((int *) sp)[36];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x0000B190
 */
int sub_0B190 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = s5;
  var1 = 0x00000000;
  ((int *) sp)[16] = s4;
  var2 = arg3;
  ((int *) sp)[13] = s1;
  var3 = arg1;
  ((int *) sp)[12] = s0;
  var4 = arg2;
  var5 = 0xFFFFFFFF;
  ((int *) sp)[18] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  if (arg1 == 0x00000000)
  {

  label76:
    ra = ((int *) sp)[18];
  }
  else
  {
    var6 = ((unsigned short *) var4)[2];
    var7 = ((int *) arg3)[5];
    if ((var6 & 0x0000FFFF) != var7)
    {
      ra = ((int *) sp)[18];
    }
    else
    {
      var8 = ((unsigned short *) var4)[3];
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      if (var8 != 0x00000000)
      {
        var61 = ((int *) var4)[3];
        var64 = scePaf_31AC0624 (0x00000010, var61);
        var10 = var64;
        if (var64 == 0x00000000)
        {

        label70:
          var13 = ((int *) sp)[0];

        label71:
          if (var13 != 0x00000000)
          {
            var20 = ((int *) sp)[1];
            var23 var24 = (*var13) (var20, 0xFFFFFFFF, arg3, arg4, arg5, arg6, arg7, arg8);
            var5 = 0xFFFFFFFF;
          }
          else
          {
            var5 = 0xFFFFFFFF;
          }
        }
        else
        {
          var65 = ((unsigned short *) var4)[3];
          ((int *) sp)[0] = 0x0000ACE8;
          ((int *) sp)[1] = var10;
          if (var65 == 0x00000001)
          {
            var69 = scePaf_BFEF859E (var10, var61, var3, 0x00000000);
          }
          else
          {
            var66 = ((int *) var4)[2];
            var69 = scePaf_D6E29A9E (var10, var61, var3, var66);
          }
          if (var69 < 0)
          {
            var13 = ((int *) sp)[0];
            goto label71;
          }
          else
          {
            var6 = ((unsigned short *) var4)[2];
            var9 = var69;

          label19:
            var11 = var6 & 0x0000FFFF;
            if (var11 == 0x00000004)
            {
              var53 = scePaf_46B03301 (var10, var9, 0x00000000, 0x00000000);
              var54 = ((int *) var53)[11];
              var32 = var53;
              var55 = ((int *) var2)[2];
              ((int *) sp)[8] = var54;
              var56 = ((int *) var32)[12];
              ((int *) sp)[4] = var54;
              ((int *) sp)[5] = var56;
              ((int *) sp)[9] = var56;
              if (((var55 < var54)) != 0x00000000)
              {

              label27:

              label28:
                var58 = ((int *) sp)[5];
              }
              else
              {
                var57 = ((int *) var2)[0];
                if (((var54 < var57)) != 0x00000000)
                {
                  goto label28;
                }
                else
                {
                  var58 = ((int *) sp)[5];
                  if (!(var54 != 0x00000000))
                    goto label27;
                }
              }
              var59 = ((int *) var2)[3];
              if (((var59 < var58)) != 0x00000000)
              {
                var1 = 0xFFFFFFFF;
              }
              else
              {
                var60 = ((int *) var2)[1];
                if (((var58 < var60)) != 0x00000000)
                {
                  var1 = 0xFFFFFFFF;
                }
                else
                {
                  if (!(var58 != 0x00000000))
                  {
                    var1 = 0xFFFFFFFF;
                  }
                }
              }

            label59:
              var41 = ((int *) sp)[0];
              if (!(var32 == 0x00000000))
              {
                scePaf_94E322DD (var32);
                scePaf_4508F2FA (var32);
                var41 = ((int *) sp)[0];
              }
              if (var41 != 0x00000000)
              {
                var46 = ((int *) sp)[1];
                var49 var50 = (*var41) (var46);
                var5 = var1;
              }
              else
              {
                var5 = var1;
              }
            }
            else
            {
              if (((var11 < 0x00000005)) != 0x00000000)
              {
                var13 = ((int *) sp)[0];
                goto label71;
              }
              else
              {
                var12 = ((int *) sp)[0];
                if (!(var11 == 0x00000005))
                  goto label70;
                var27 = sub_0AD04 (var10, var9);
                if (var27 == 0x00000000)
                  goto label70;
                var30 = scePaf_07A14F5B (var10, var9);
                var31 = ((int *) var30)[11];
                var32 = var30;
                var33 = ((int *) var2)[2];
                ((int *) sp)[4] = var31;
                var34 = ((int *) var32)[12];
                ((int *) sp)[8] = var31;
                ((int *) sp)[9] = var34;
                ((int *) sp)[5] = var34;
                if (((var33 < var31)) != 0x00000000)
                {

                label47:

                label48:
                  var36 = ((int *) sp)[9];
                }
                else
                {
                  var35 = ((int *) var2)[0];
                  if (((var31 < var35)) != 0x00000000)
                  {
                    goto label48;
                  }
                  else
                  {
                    var36 = ((int *) sp)[9];
                    if (!(var31 != 0x00000000))
                      goto label47;
                  }
                }
                var37 = ((int *) var2)[3];
                if (((var37 < var36)) != 0x00000000)
                {

                label56:
                  var39 = ((int *) var2)[4];
                }
                else
                {
                  var38 = ((int *) var2)[1];
                  if (((var36 < var38)) != 0x00000000)
                  {
                    goto label56;
                  }
                  else
                  {
                    if (var36 != 0x00000000)
                    {
                      var39 = ((int *) var2)[4];
                    }
                    else
                    {
                      goto label56;
                    }
                  }
                }
                if (!(var39 == 0xFFFFFF9C))
                {
                  var40 = ((int *) var32)[31];
                  var1 = ((var39 ^ var40)) ? 0xFFFFFFFF : var1;
                }
                goto label59;
              }
            }
          }
        }
      }
      else
      {
        var9 = ((int *) var4)[2];
        var10 = var3;
        goto label19;
      }
      goto label76;
    }
  }
  var14 = ((int *) sp)[17];
  var15 = ((int *) sp)[16];
  var16 = ((int *) sp)[15];
  var17 = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var5;
}

/**
 * Subroutine at address 0x0000B448
 */
int sub_0B448 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF90;
  var1 = arg2;
  ((int *) sp)[23] = s3;
  ((int *) sp)[21] = s1;
  var2 = sp;
  ((int *) sp)[22] = s2;
  ((int *) sp)[20] = s0;
  ((int *) sp)[24] = ra;
  ((int *) sp)[2] = var1;
  ((char *) sp)[17] = 0x00000001;
  ((int *) sp)[0] = 0x00000014;
  ((int *) sp)[1] = var1;
  ((char *) sp)[16] = 0x00000000;
  var5 = sceVshBridge_A5628F0D (arg1, 0x00000000, var2);
  var6 = sp + 0x00000020;
  var7 = sp + 0x00000040;
  if (!(var5 < 0))
  {
    ((int *) sp)[11] = 0x00000042;
    ((int *) sp)[8] = 0x00000014;
    ((int *) sp)[10] = 0x00000800;
    ((int *) sp)[9] = 0x00000000;
    ((int *) sp)[12] = 0x00000000;
    var10 = ModuleMgrForUser_50F0C1EC (var5, arg3, arg4, var7, var6);
    var5 = !(((var10 < 0x00000000))) ? var5 : var10;
  }
  ra = ((int *) sp)[24];
  var11 = ((int *) sp)[23];
  var12 = ((int *) sp)[22];
  var13 = ((int *) sp)[21];
  var14 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return var5;
}

/**
 * Subroutine at address 0x0000B4F4
 */
void sub_0B4F4 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[13] = ra;
  var1 = sp + 0x00000020;
  var2 = sp;
  if (arg1 != 0x00000000)
  {
    ((int *) sp)[0] = 0x00000014;
    ((int *) sp)[2] = 0x00000800;
    ((int *) sp)[3] = 0x00000042;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[4] = 0x00000000;
    var6 = ModuleMgrForUser_D1FF982A (arg1, 0x00000000, 0x00000000, var1, var2);
    if (!(var6 < 0))
    {
      var9 = ModuleMgrForUser_2E0911AA (arg1);
    }
  }
  ra = ((int *) sp)[13];
  var3 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0000B570
 */
void sub_0B570 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x000474F4);
  if (var1 != 0x00000000)
  {
    sceMpeg_874624D6 ();
  }
  else
  {
  }
  sceAtrac3plus_132F1ECA (0x00000000, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000B5B4
 */
void sub_0B5B4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x000474F4);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {

  label6:
    sceMpeg_682A619B ();
  }
  else
  {
    var4 = sub_0B448 ("flash0:/kd/mpeg_vsh.prx", 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x000474F4) = var4;
    if (!(var4 == 0x00000000))
      goto label6;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000B60C
 */
void vsh_C20DA1FE ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  sub_0B570 ();
  sceVshBridge_7D3BB7EB (0x00000003);
  sub_0B5B4 ();
  sceAtrac3plus_132F1ECA (0x00000002, 0x00000002);
  var12 = sp;
  sceVshCommonUtil_B5C86FBB (var12);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B658
 */
void vsh_6443BB05 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  sub_0B570 ();
  sceVshBridge_7D3BB7EB (0x00000001);
  sub_0B5B4 ();
  var10 = sp;
  sceVshCommonUtil_B5C86FBB (var10);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B698
 */
void vsh_809F6A64 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  sub_0B570 ();
  sceVshBridge_7D3BB7EB (0x00000004);
  sub_0B5B4 ();
  var10 = sp;
  sceVshCommonUtil_B5C86FBB (var10);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B6D8
 */
void vsh_C6C114DB ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[4] = ra;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  var6 = sub_0B448 ("flash0:/kd/usbstor.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x000474F8) = var6;
  var9 = sub_0B448 ("flash0:/kd/usbstormgr.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x000474FC) = var9;
  var12 = sub_0B448 ("flash0:/kd/mlnbridge.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00047500) = var12;
  var15 = sub_0B448 ("flash0:/vsh/module/mcore.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00047504) = var15;
  var18 = sub_0B448 ("flash0:/vsh/module/mlnusb.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00047508) = var18;
  var21 = sub_0B448 ("flash0:/kd/usbstorms.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x0004750C) = var21;
  var24 = sub_0B448 ("flash0:/kd/usbstorboot.prx", 0x00000000, 0x00000000, 0x00000000);
  var25 = sp;
  *((int *) 0x00047510) = var24;
  sceVshCommonUtil_B5C86FBB (var25);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B7E0
 */
void vsh_86488AEA ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[9] = ra;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  var4 = *((int *) 0x00047510);
  sub_0B4F4 (var4);
  var7 = *((int *) 0x0004750C);
  *((int *) 0x00047510) = 0x00000000;
  sub_0B4F4 (var7);
  var10 = *((int *) 0x00047508);
  *((int *) 0x0004750C) = 0x00000000;
  sub_0B4F4 (var10);
  var13 = *((int *) 0x00047504);
  *((int *) 0x00047508) = 0x00000000;
  sub_0B4F4 (var13);
  var16 = *((int *) 0x00047500);
  *((int *) 0x00047504) = 0x00000000;
  sub_0B4F4 (var16);
  var19 = *((int *) 0x000474FC);
  *((int *) 0x00047500) = 0x00000000;
  sub_0B4F4 (var19);
  var22 = *((int *) 0x000474F8);
  *((int *) 0x000474FC) = 0x00000000;
  sub_0B4F4 (var22);
  var25 = sp;
  *((int *) 0x000474F8) = 0x00000000;
  sceVshCommonUtil_B5C86FBB (var25);
  ra = ((int *) sp)[9];
  var28 = ((int *) sp)[8];
  var29 = ((int *) sp)[7];
  var30 = ((int *) sp)[6];
  var31 = ((int *) sp)[5];
  var32 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000B8A0
 */
void sub_0B8A0 ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[4] = ra;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  var6 = sub_0B448 ("flash0:/kd/lflash_fatfmt.prx", 0x00000000, 0x00000000, 0x00000000);
  var7 = sp;
  *((int *) 0x00047514) = var6;
  sceVshCommonUtil_B5C86FBB (var7);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B8E8
 */
void sub_0B8E8 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  var4 = *((int *) 0x00047514);
  sub_0B4F4 (var4);
  var7 = sp;
  *((int *) 0x00047514) = 0x00000000;
  sceVshCommonUtil_B5C86FBB (var7);
  ra = ((int *) sp)[5];
  var10 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B928
 */
void sub_0B928 ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[4] = ra;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  var6 = sub_0B448 ("flash0:/kd/mlnbridge.prx", 0x00000000, 0x00000000, 0x00000000);
  var7 = sp;
  *((int *) 0x00047500) = var6;
  sceVshCommonUtil_B5C86FBB (var7);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B970
 */
void sub_0B970 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  var4 = *((int *) 0x00047500);
  sub_0B4F4 (var4);
  var7 = sp;
  *((int *) 0x00047500) = 0x00000000;
  sceVshCommonUtil_B5C86FBB (var7);
  ra = ((int *) sp)[5];
  var10 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000B9B0
 */
void vsh_EDBC1A50 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (((0x0000FFFF < (arg1 + 0x7FF80000))) != 0x00000000)
  {
    var9 = Kernel_Library_092968F4 ();
    var4 = 0x00000002;
  }
  else
  {
    var3 = Kernel_Library_092968F4 ();
    var4 = 0x00000001;
  }
  *((int *) 0x00047518) = var4;
  Kernel_Library_5F10D406 (var3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BA08
 */
void vsh_E5463CE5 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var3 = Kernel_Library_092968F4 ();
  *((int *) 0x00047518) = arg1;
  Kernel_Library_5F10D406 (var3);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BA3C
 */
void sub_0BA3C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_0D464 (0x00000001);
  ((char *) var3)[2] = 0x00000001;
  vsh_6216FAD3 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BA64
 */
void sub_0BA64 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var3 = Kernel_Library_092968F4 ();
  var4 = *((int *) 0x00047518);
  Kernel_Library_5F10D406 (var3);
  if (var4 != 0x00000000)
  {
    var11 = scePaf_A78805B0 ("impose_plugin");
    if (var11 == 0x00000000)
    {

    label20:
      ra = ((int *) sp)[2];
    }
    else
    {
      var14 = scePaf_4E87FDFC (var11, 0x00000001);
      if (var14 == 0x00000000)
        goto label20;
      var15 = ((int *) var14)[0];
      var18 var19 = (*var15) (var4, 0x0000BA3C);
      var22 = Kernel_Library_092968F4 ();
      *((int *) 0x00047518) = 0x00000000;
      Kernel_Library_5F10D406 (var22);
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label20;
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BAFC
 */
int sub_0BAFC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00038104;
  if ((arg1 & 0x0000FFFF) == 0x00000050)
  {
    var4 = sceVshBridge_2EB0812A ();
    if (var4 != 0x00000000)
    {
      var7 = sceVshBridge_2EB0812A ();
      var1 = 0x0003810C;
      if (!(var7 != 0x00000001))
      {

      label12:
        var1 = 0x00038108;
      }
    }
    else
    {
      goto label12;
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x0000BB60
 */
void vsh_8ECCA070 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)
{
  ((int *) arg1)[0] = 0x00000000;
  sp = sp + 0xFFFFFFA0;
  var1 = ((int *) sp)[24];
  var2 = ((int *) sp)[25];
  ((int *) sp)[20] = ra;
  ((int *) sp)[10] = var1;
  var3 = ((int *) sp)[26];
  ((int *) sp)[17] = s1;
  ((int *) sp)[4] = arg3;
  ((int *) sp)[5] = arg4;
  ((int *) sp)[6] = arg5;
  ((int *) sp)[7] = arg6;
  ((int *) sp)[8] = arg7;
  ((int *) sp)[9] = arg8;
  ((int *) sp)[11] = var2;
  ((int *) sp)[12] = var3;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  var4 = arg1;
  ((int *) sp)[16] = s0;
  var5 = arg2;
  while (1) {
    var8 = scePaf_1183E654 (var5, 0x00000025);
    var9 = var8;
    if (var8 == 0x00000000)
      break;
    sub_32558 (var4, var5, ((var8 - var5) >> 0x00000001));
    var12 = ((unsigned short *) var9)[1];
    if (var12 == 0x00000025)
    {
      var5 = var9 + 0x00000004;
      sub_32624 (var4, 0x00000001, 0x00000025);
      continue;
    }
    else
    {
      var13 = (var12 << 0x00000002) + sp;
      if ((((var12 + 0xFFFFFFCF) < 0x00000009)) != 0x00000000)
      {
        var21 = ((int *) var13)[1073741779];

      label23:
        var24 = scePaf_937DE11C (var21);
        sub_32558 (var4, var21, var24);
        var5 = var9 + 0x00000004;

      label32:
        continue;
      }
      else
      {
        if (((((var12 + 0xFFFFFFBF) < 0x0000001A)) | (((var12 + 0xFFFFFF9F) < 0x0000001A))) != 0x00000000)
        {
          var20 = sub_0BAFC (var12);
          var21 = var20;
          goto label23;
        }
        else
        {
          var5 = var9 + 0x00000004;
          if (!(var12 == 0x00000000))
            goto label32;
        }
      }
    }
    goto label30;
  }
  var31 = scePaf_937DE11C (var5);
  sub_32558 (var4, var5, var31);

label30:
  ra = ((int *) sp)[20];
  var14 = ((int *) sp)[19];
  var15 = ((int *) sp)[18];
  var16 = ((int *) sp)[17];
  var17 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0000BCC8
 */
void sub_0BCC8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var3 = scePaf_967A56EF (0x00047544);
  var4 = var3 + 0x00000001;
  *((int *) 0x00047670) = var4;
  var7 = scePaf_6CEA048C (var4);
  var8 = *((int *) 0x00047670);
  *((int *) 0x00047674) = var7;
  scePaf_6439FDBC (var7, 0x00000000, var8);
  var11 = *((int *) 0x00047674);
  var12 = *((int *) 0x00047670);
  scePaf_ACB55E4C (var11, 0x00047544, var12);
  ra = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BD44
 */
void sub_0BD44 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x0004751C) = arg1;
  sub_1122C ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BD64
 */
void sub_0BD64 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  sub_2F9C4 ();
  sceVshBridge_77E6E39A (0x00000001);
  var5 = *((int *) 0x0004751C);
  var6 = 0x00000000;
  if (!(((var5 < 0x0000000B)) == 0x00000000))
  {
    var7 = ((int *) ((var5 << 0x00000002) + 0x00041E8C))[0];
    switch () {
    case 0:
      goto label43;
    case 1:
      var26 = sceVshBridge_49B2179B (0x00047544, 0x00047520);
      var6 = var26;
      goto label43;
    case 2:
      sceVshBridge_AA2605A0 ("MSTKUPDATE", 0x00000000, 0x00000000);
      var31 = sceVshBridge_38456405 (0x00047544, 0x00047520);
      var6 = var31;
      goto label43;
    case 3:
      sceVshBridge_AA2605A0 ("MSTKUPDATE", 0x00000000, 0x00000000);
      var36 = sceVshBridge_E9C1F4E2 (0x00047544, 0x00047520);
      var6 = var36;
      goto label43;
    case 4:
      var39 = sceVshBridge_5185BF94 (0x00047544, 0x00047520);
      var6 = var39;
      goto label43;
    case 5:
      var42 = sceVshBridge_59661973 (0x00047544, 0x00047520);
      var6 = var42;
      goto label43;
    case 6:
      var45 = sceVshBridge_CE60CEA6 (0x00047544, 0x00047520);
      var6 = var45;
      goto label43;
    case 7:
      var48 = sceVshBridge_308E9377 (0x00047544, 0x00047520);
      var6 = var48;
      goto label43;
    case 8:
      var51 = sceVshBridge_0FB106ED (0x00047544, 0x00047520);
      var6 = var51;
      goto label43;
    case 9:
      var52 = *((int *) 0x0004766C);
      var53 = *((int *) 0x00047668);
      var56 = sceVshBridge_524EE9AE (var52, var53, 0x00047520);
      var6 = var56;
      goto label43;
    case 10:
      var59 = sceVshBridge_44DBAED5 (0x00047520);
      var6 = var59;
      goto label43;
    }
  }

label43:
  var10 = sub_0D464 (0x00000000);
  ((int *) var10)[6] = var6;
  ((int *) var10)[0] = 0x00000020;
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = 0x00038110;
  *((int *) 0x00047524) = 0x00000000;
  *((int *) 0x00047528) = 0x00000000;
  var15 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var15;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  *((int *) 0x00047540) = 0x00000000;
  var18 = sceVshBridge_44DBAED5 (0x00047520);
  var19 = *((int *) 0x00047674);
  if (var19 != 0x00000000)
  {
    scePaf_22FB4177 (var19);
    ra = ((int *) sp)[2];
  }
  else
  {
    ra = ((int *) sp)[2];
  }
  var20 = ((int *) sp)[1];
  var21 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BF98
 */
void vsh_BB96E0C6 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var3 = sceVshBridge_A8374B9D ();
  if (var3 == 0x00000000)
  {
    scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  }
  else
  {
    scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  }
  scePaf_ACB55E4C (0x00047544, "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", 0x00000122);
  sub_0BCC8 ();
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var12 = *((int *) 0x00047670);
  var13 = *((int *) 0x00047674);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047528) = var13;
  *((int *) 0x00047524) = var12;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "game";
  var16 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var16;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000001);
  ra = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C080
 */
void vsh_4ED7911F ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, "disc0:/PSP_GAME/SYSDIR/UPDATE/EBOOT.BIN", 0x00000122);
  sub_0BCC8 ();
  var9 = sub_0D464 (0x00000001);
  ((char *) var9)[1] = 0x00000001;
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var12 = *((int *) 0x00047670);
  var13 = *((int *) 0x00047674);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047528) = var13;
  *((int *) 0x00047524) = var12;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "updater";
  var16 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var16;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000002);
  ra = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C150
 */
void vsh_06232A07 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, arg1, 0x00000122);
  sub_0BCC8 ();
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var9 = *((int *) 0x00047670);
  var10 = *((int *) 0x00047674);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047528) = var10;
  *((int *) 0x00047524) = var9;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "game";
  var13 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var13;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000004);
  ra = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C21C
 */
void vsh_858BD2E2 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, arg1, 0x00000122);
  sub_0BCC8 ();
  var9 = sub_0D464 (0x00000001);
  ((char *) var9)[1] = 0x00000001;
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var12 = *((int *) 0x00047670);
  var13 = *((int *) 0x00047674);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047528) = var13;
  *((int *) 0x00047524) = var12;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "updater";
  var16 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var16;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000003);
  ra = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C2EC
 */
void vsh_61034B37 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, arg1, 0x00000122);
  sub_0BCC8 ();
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var9 = *((int *) 0x00047670);
  var10 = *((int *) 0x00047674);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047528) = var10;
  *((int *) 0x00047524) = var9;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "pops";
  var13 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var13;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000005);
  ra = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C3B8
 */
void vsh_B5DC03BF (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, arg1, 0x00000122);
  sub_0BCC8 ();
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var9 = *((int *) 0x00047670);
  var10 = *((int *) 0x00047674);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047528) = var10;
  *((int *) 0x00047524) = var9;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = 0x000381A4;
  var13 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var13;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000006);
  ra = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C484
 */
void vsh_D6748965 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, arg1, 0x00000122);
  sub_0BCC8 ();
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var9 = *((int *) 0x00047670);
  var10 = *((int *) 0x00047674);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047528) = var10;
  *((int *) 0x00047524) = var9;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "licensegame";
  var13 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var13;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000007);
  ra = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C550
 */
void vsh_FC61562C (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[13] = s1;
  ((int *) sp)[16] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, arg1, 0x00000122);
  sub_0BCC8 ();
  var7 = "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN";
  var8 = sp;
  while (1) {
    var9 = ((int *) var7)[0];
    var10 = ((int *) var7)[1];
    var11 = ((int *) var7)[2];
    var12 = ((int *) var7)[3];
    ((int *) var8)[0] = var9;
    var7 = var7 + 0x00000010;
    var8 = var8 + 0x00000010;
    ((int *) var8)[1073741821] = var10;
    ((int *) var8)[1073741822] = var11;
    ((int *) var8)[1073741823] = var12;
    if (var7 != 0x00038140)
      continue;
    break;
  }
  var13 = ((char *) var7)[0];
  ((char *) var8)[0] = var13;
  var14 = sp;
  var17 = scePaf_967A56EF (var14);
  var18 = var17 + 0x00000001;
  *((int *) 0x00047678) = var18;
  var21 = scePaf_6CEA048C (var18);
  var22 = *((int *) 0x00047678);
  *((int *) 0x0004767C) = var21;
  scePaf_6439FDBC (var21, 0x00000000, var22);
  var25 = *((int *) 0x0004767C);
  var26 = *((int *) 0x00047678);
  var27 = sp;
  scePaf_ACB55E4C (var25, var27, var26);
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  var32 = *((int *) 0x00047678);
  var33 = *((int *) 0x0004767C);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047524) = var32;
  *((int *) 0x00047528) = var33;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "umdemu";
  var36 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var36;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000008);
  ra = ((int *) sp)[16];
  var39 = ((int *) sp)[15];
  var40 = ((int *) sp)[14];
  var41 = ((int *) sp)[13];
  var42 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000C6A4
 */
void vsh_E98467AF (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s6;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[7] = ra;
  ((int *) sp)[0] = s0;
  if (arg2 == 0x00000000)
  {
    vsh_6216FAD3 ();
  }
  else
  {
  }
  scePaf_6439FDBC (0x00047544, 0x00000000, 0x00000123);
  scePaf_ACB55E4C (0x00047544, "wlan0", 0x00000122);
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047524) = arg3;
  *((int *) 0x00047528) = arg4;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = "game";
  var9 = sub_0D464 (0x00000000);
  *((int *) 0x0004766C) = arg1;
  *((int *) 0x00047668) = arg2;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047534) = var9;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x00000009);
  ra = ((int *) sp)[7];
  var12 = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C7AC
 */
void vsh_6216FAD3 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x00047530) = 0x00000400;
  *((int *) 0x0004752C) = 0x00038110;
  *((int *) 0x00047524) = 0x00000000;
  *((int *) 0x00047528) = 0x00000000;
  var5 = sub_0D464 (0x00000000);
  *((int *) 0x00047534) = var5;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x0000000A);
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C82C
 */
void vsh_CEA24263 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  scePaf_6439FDBC (0x00047520, 0x00000000, 0x00000024);
  *((int *) 0x00047520) = 0x00000024;
  *((int *) 0x0004752C) = 0x00038110;
  *((int *) 0x00047540) = 0x00000000;
  *((int *) 0x00047524) = 0x00000000;
  *((int *) 0x00047528) = 0x00000000;
  *((int *) 0x00047530) = 0x00000000;
  *((int *) 0x00047534) = 0x00000000;
  *((int *) 0x00047538) = 0x00000000;
  *((int *) 0x0004753C) = 0x00000000;
  sub_0BD44 (0x0000000A);
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C8A0
 */
void module_start (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  sub_00000 ();
  if (!(((((var1 ^ 0x00000400) < 0x00000001)) | (((var1 ^ 0x00000020) < 0x00000001))) == 0x00000000))
  {
    var5 = ((int *) var2)[0];
    if (var5 == var1)
    {
      var11 = ((int *) var2)[1];
      if (var11 != 0x00000020)
      {

      label13:
      }
      else
      {
        var14 = sub_0D464 (0x00000000);
        scePaf_3447707B (var14, var2, var5);
      }
    }
    else
    goto label13;
  }
  sub_110D0 ();
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C93C
 */
void module_stop ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_34278 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C95C
 */
void vsh_9BB1BFE6 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = sp;
  scePaf_6439FDBC (var1, 0x00000000, 0x00000004);
  var4 = sp;
  ((int *) sp)[0] = arg1;
  var7 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425856, var4, 0x00000004, 0x00000000, 0x00000000);
  ra = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C9B4
 */
void vsh_B7E14A51 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[15] = s3;
  var1 = arg2;
  ((int *) sp)[13] = s1;
  var2 = arg3;
  ((int *) sp)[12] = s0;
  var3 = arg1;
  var4 = sp;
  ((int *) sp)[16] = ra;
  ((int *) sp)[14] = s2;
  var5 = arg4;
  scePaf_6439FDBC (var4, 0x00000000, 0x00000014);
  var8 = sp + 0x00000020;
  ((int *) sp)[8] = sp;
  var11 = IoFileMgrForUser_54F5FB11 ("ms0:", 0x02425818, var8, 0x00000004, 0x00000000, 0x00000000);
  var12 = var11;
  if (!(var11 < 0))
  {
    var13 = ((int *) sp)[4];
    if (!(var3 == 0x00000000))
    {
      ((int *) var3)[0] = var13;
    }
    var14 = ((int *) sp)[1];
    if (!(var2 == 0x00000000))
    {
      ((int *) var2)[0] = (MAX ((var14 + 0xFFFFFFFE), 0x00000000));
    }
    var15 = ((int *) sp)[3];
    if (!(var1 == 0x00000000))
    {
      ((int *) var1)[0] = var15;
    }
    var16 = ((int *) sp)[0];
    if (!(var5 == 0x00000000))
    {
      ((int *) var5)[0] = var16;
    }
    var12 = 0x00000000;
  }
  ra = ((int *) sp)[16];
  var17 = ((int *) sp)[15];
  var18 = ((int *) sp)[14];
  var19 = ((int *) sp)[13];
  var20 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000CA7C
 */
void vsh_926517CD (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[13] = ra;
  var2 = sp;
  sceVshCommonUtil_D87E8E2D (var2, "/CONFIG/SYSTEM/XMB");
  var5 = sp;
  var6 = sp + 0x00000020;
  var9 = sceVshCommonUtil_7A73DC84 (var5, "language", var6);
  ((int *) var1)[5] = 0x000F5000;
  ((int *) var1)[0] = 0x00000001;
  ((int *) var1)[1] = "flash0:/vsh/module/osk_plugin.prx";
  ((int *) var1)[2] = "flash0:/vsh/module/osk_plugin_500.prx";
  ((int *) var1)[3] = "flash0:/vsh/resource/osk_utility.rco";
  var10 = sp;
  ((int *) var1)[4] = "flash0:/vsh/resource/osk_plugin_500.rco";
  sceVshCommonUtil_625A9A5D (var10);
  ra = ((int *) sp)[13];
  var13 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0000CB0C
 */
int sub_0CB0C (int arg1)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[27] = ra;
  ((int *) sp)[26] = s6;
  ((int *) sp)[25] = s5;
  ((int *) sp)[24] = s4;
  var1 = sp + 0x00000020;
  ((int *) sp)[21] = s1;
  var2 = arg1;
  ((int *) sp)[20] = s0;
  ((int *) sp)[23] = s3;
  ((int *) sp)[22] = s2;
  var3 = *((int *) 0x00047680);
  ((int *) sp)[0] = 0x00047680;
  var4 = ((int *) var3)[2];
  var7 var8 = (*var4) (0x00047680, var3, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) sp)[8] = 0x00000000;
  ((int *) sp)[9] = 0x00000000;
  sub_318F0 (var1, var2);
  var11 = sp + 0x00000010;
  sub_32700 (var11, 0x000476A4, var1);
  var14 = *((int *) 0x000476A4);
  var15 = ((int *) sp)[4];
  ((int *) sp)[16] = var14;
  sub_317D8 (var1);
  var18 = 0x00000000;
  if ((((0x00000000 < (var15 ^ var14))) & 0x000000FF) != 0x00000000)
  {
    var58 = ((int *) sp)[0];

  label107:
    var59 = ((int *) var58)[0];
    var60 = ((int *) var59)[3];
    var63 var64 = (*var60) (var58);
    var50 = 0x00000000;
  }
  else
  {
    var19 = ((unsigned char *) var2)[0];
    var20 = (var19 + 0xFFFFFF9D) & 0x000000FF;
    var21 = 0x00000000;
    if (((var20 < 0x00000014)) == 0x00000000)
    {
    case 1:
    case 2:
    case 3:
    case 6:
    case 7:
    case 8:
    case 14:
    case 17:

    label104:
      var26 = (0x00000000 < var18);
    }
    else
    {
      var22 = ((int *) ((var20 << 0x00000002) + 0x00041ECC))[0];
      switch () {
      case 0:
        var25 = scePaf_E3D530AE (var2, "camera_plugin");
        if (var25 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/camera_plugin.prx";
          var21 = "camera_plugin_main";
          goto label104;
        }
      goto label104;
      goto label104;
      goto label104;
      case 4:
        var67 = scePaf_E3D530AE (var2, "game_plugin");
        if (var67 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/game_plugin.prx";
          var21 = "game_plugin_main";
          goto label104;
        }
      case 5:
        var70 = scePaf_E3D530AE (var2, "htmlviewer_plugin");
        if (var70 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/htmlviewer_plugin.prx";
          var21 = "htmlviewer_plugin_main";
          goto label104;
        }
      goto label104;
      goto label104;
      goto label104;
      case 9:
        var73 = scePaf_E3D530AE (var2, "launcher_plugin");
        if (var73 != 0x00000000)
        {
          var76 = scePaf_E3D530AE (var2, "lftv_plugin");
          if (var76 != 0x00000000)
          {
            var79 = scePaf_E3D530AE (var2, "license_plugin");
            if (var79 != 0x00000000)
            {
              var26 = (0x00000000 < 0x00000000);
            }
            else
            {
              var18 = "flash0:/vsh/module/license_plugin.prx";
              var21 = "license_plugin_main";
              goto label104;
            }
          }
          else
          {
            var18 = "flash0:/vsh/module/lftv_plugin.prx";
            var21 = "lftv_plugin_main";
            goto label104;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/launcher_plugin.prx";
          var21 = "launcher_plugin_main";
          goto label104;
        }
      case 10:
        var82 = scePaf_E3D530AE (var2, "msvideo_plugin");
        if (var82 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/msvideo_plugin.prx";
          var21 = "msvideo_plugin_main";
          goto label104;
        }
      case 11:
        var85 = scePaf_E3D530AE (var2, "netconf_plugin");
        if (var85 != 0x00000000)
        {
          var88 = scePaf_E3D530AE (var2, "netplay_client_plugin");
          if (var88 != 0x00000000)
          {
            var26 = (0x00000000 < 0x00000000);
          }
          else
          {
            var18 = "flash0:/vsh/module/netplay_client_plugin.prx";
            var21 = "netplay_plugin_main";
            goto label104;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/netconf_plugin.prx";
          var21 = "netconf_plugin_main";
          goto label104;
        }
      case 12:
        var91 = scePaf_E3D530AE (var2, "oneseg_launcher_plugin");
        if (var91 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/oneseg_launcher_plugin.prx";
          var21 = "oneseg_plugin_main";
          goto label104;
        }
      case 13:
        var94 = scePaf_E3D530AE (var2, "premo_plugin");
        if (var94 != 0x00000000)
        {
          var97 = scePaf_E3D530AE (var2, "psn_plugin");
          if (var97 != 0x00000000)
          {
            var26 = (0x00000000 < 0x00000000);
          }
          else
          {
            var18 = "flash0:/vsh/module/psn_plugin.prx";
            var21 = "psn_plugin_main";
            goto label104;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/premo_plugin.prx";
          var21 = "premo_plugin_main";
          goto label104;
        }
      goto label104;
      case 15:
        var100 = scePaf_E3D530AE (var2, "radioshack_plugin");
        if (var100 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/radioshack_plugin.prx";
          var21 = "radioshack_plugin_main";
          goto label104;
        }
      case 16:
        var103 = scePaf_E3D530AE (var2, "sysconf_plugin");
        if (var103 != 0x00000000)
        {
          var106 = scePaf_E3D530AE (var2, "savedata_plugin");
          if (var106 != 0x00000000)
          {
            var109 = scePaf_E3D530AE (var2, "skype_plugin");
            if (var109 != 0x00000000)
            {
              var26 = (0x00000000 < 0x00000000);
            }
            else
            {
              var18 = "flash0:/vsh/module/skype_plugin.prx";
              var21 = "skype_plugin_main";
              goto label104;
            }
          }
          else
          {
            var18 = "flash0:/vsh/module/savedata_plugin.prx";
            var21 = "savedata_plugin_main";
            goto label104;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/sysconf_plugin.prx";
          var21 = "sysconf_plugin_main";
          goto label104;
        }
      goto label104;
      case 18:
        var112 = scePaf_E3D530AE (var2, "update_plugin");
        if (var112 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/update_plugin.prx";
          var21 = "update_plugin_main";
          goto label104;
        }
      case 19:
        var115 = scePaf_E3D530AE (var2, "video_plugin");
        if (var115 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/video_plugin.prx";
          var21 = "video_plugin_main";
          goto label104;
        }
      }
    }
    if ((var26 & ((0x00000000 < var21))) == 0x00000000)
    {
      var58 = ((int *) sp)[0];
      goto label107;
    }
    else
    {
      var29 = scePaf_48BB05D5 (0x00000004);
      var30 = var29;
      scePaf_79B2405B (var29, var18, var21, 0x00000001, 0x00000000, 0x00000000);
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[9] = 0x00000000;
      sub_318F0 (var1, var2);
      var37 = sub_32738 (0x000476A4, var1);
      ((int *) var37)[0] = var30;
      sub_317D8 (var1);
      var42 = scePaf_ED355845 (var30, 0x00000001);
      var43 = ((int *) sp)[0];
      var44 = ((int *) var43)[0];
      var45 = ((int *) var44)[3];
      var48 var49 = (*var45) (var43);
      var50 = var42;
    }
  }
  ra = ((int *) sp)[27];
  var51 = ((int *) sp)[26];
  var52 = ((int *) sp)[25];
  var53 = ((int *) sp)[24];
  var54 = ((int *) sp)[23];
  var55 = ((int *) sp)[22];
  var56 = ((int *) sp)[21];
  var57 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return var50;
}

/**
 * Subroutine at address 0x0000CFB4
 */
void sub_0CFB4 (int arg1)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[27] = ra;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  var1 = sp + 0x00000030;
  var2 = *((int *) 0x00047680);
  ((int *) sp)[0] = 0x00047680;
  var3 = ((int *) var2)[2];
  var6 var7 = (*var3) (0x00047680, var2, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) sp)[12] = 0x00000000;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  sub_318F0 (var1, arg1);
  var10 = sp + 0x00000020;
  sub_32700 (var10, 0x000476A4, var1);
  var13 = ((int *) sp)[8];
  ((int *) sp)[4] = var13;
  sub_317D8 (var1);
  var16 = *((int *) 0x000476A4);
  var17 = ((int *) sp)[4];
  ((int *) sp)[8] = var16;
  if (!(var17 == var16))
  {
    var18 = ((int *) var17)[6];
    if (var18 != 0x00000000)
    {
      scePaf_7B15E9DC (var18);
      scePaf_4508F2FA (var18);
      var19 = ((int *) sp)[4];
    }
    else
    {
      var19 = ((int *) sp)[4];
    }
    var20 = sp + 0x00000050;
    ((int *) sp)[20] = var19;
    sub_327A0 (0x000476A4, var20);
  }
  var23 = ((int *) sp)[0];
  var24 = ((int *) var23)[0];
  var25 = ((int *) var24)[3];
  var28 var29 = (*var25) (var23);
  ra = ((int *) sp)[27];
  var30 = ((int *) sp)[26];
  var31 = ((int *) sp)[25];
  var32 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0000D0A8
 */
void sub_0D0A8 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = s1;
  ((int *) sp)[18] = ra;
  ((int *) sp)[16] = s0;
  var1 = *((int *) 0x00047680);
  ((int *) sp)[0] = 0x00047680;
  var2 = ((int *) var1)[2];
  var5 var6 = (*var2) (0x00047680, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) sp)[4] = 0x00000000;
  var7 = *((int *) 0x000476A4);
  var8 = ((int *) var7)[1];
  ((int *) sp)[8] = var7;
  ((int *) sp)[4] = var8;
  if (!(var8 == var7))
  {
    while (1) {
      var9 = ((int *) sp)[4];
      var10 = ((int *) var9)[6];
      if (var10 != 0x00000000)
      {
        scePaf_7B15E9DC (var10);
        scePaf_4508F2FA (var10);
        var11 = ((int *) sp)[4];
      }
      else
      {
        var11 = ((int *) sp)[4];
      }
      ((int *) sp)[12] = var11;
      var14 = sub_327D0 (var11);
      var15 = *((int *) 0x000476A4);
      ((int *) sp)[4] = var14;
      ((int *) sp)[8] = var15;
      if (var14 != var15)
        continue;
      break;
    }
  }
  sub_32850 (0x000476A4);
  var18 = ((int *) sp)[0];
  var19 = ((int *) var18)[0];
  var20 = ((int *) var19)[3];
  var23 var24 = (*var20) (var18);
  ra = ((int *) sp)[18];
  var25 = ((int *) sp)[17];
  var26 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000D164
 */
void sub_0D164 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_05F48 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D184
 */
void sub_0D184 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_05F48 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D1A4
 */
void sub_0D1A4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = ThreadManForUser_E81CAF8F ("SCE_VSH_POWERCALLBACK", 0x0000D228, 0x00000000);
  *((int *) 0x000476B0) = var3;
  var4 = var3;
  if (!(var3 < 0))
  {
    var7 = scePower_04B7766E (0x00000000, var3);
    var4 = MIN (var7, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D1FC
 */
void sub_0D1FC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePower_DFA8BAF8 (0x00000000);
  var3 = *((int *) 0x000476B0);
  ThreadManForUser_EDBA5844 (var3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D228
 */
void sub_0D228 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  if ((arg2 & 0x00040000) == 0x00000000)
  {
    if ((arg2 & 0x00020000) == 0x00000000)
    {
    }
    else
    {
      var24 = *((unsigned char *) 0x000476BA);
      if (var24 != 0x00000000)
      {
      }
      else
      {
        *((char *) 0x000476BA) = 0x00000001;
        var27 = sceVshBridge_A71BF332 ();
        if (!(var27 <= 0))
        {
          vsh_2FCC4BC4 (0x00000000);
        }
        scePaf_6D516E8A (0x0000040C, 0x00000000, 0x00000000);
      }
    }
  }
  else
  {
    var1 = *((unsigned char *) 0x000476BA);
    if (var1 == 0x00000000)
    {
      scePaf_6D516E8A (0x0000040C, 0x00000000, 0x00000000);
    }
    sub_2FE78 ();
    *((char *) 0x000476BA) = 0x00000000;
    scePaf_6D516E8A (0x0000040D, 0x00000000, 0x00000000);
    var6 = *((unsigned char *) 0x000476BC);
    if (var6 != 0x00000000)
    {
      *((char *) 0x000476BC) = 0x00000000;
      scePaf_30BCB0F4 ();
      scePaf_5E770EF9 ();
    }
    else
    {
    }
  }
  if ((arg2 & 0x00010000) == 0x00000000)
  {
    *((char *) 0x000476B8) = 0x00000000;
  }
  else
  {
    var7 = *((unsigned char *) 0x000476B8);
    if (var7 == 0x00000000)
    {
      *((char *) 0x000476B8) = 0x00000001;
      scePaf_6D516E8A (0x0000040B, 0x00000000, 0x00000000);
      scePaf_68CE0A83 ();
      scePaf_88A5E3CF ();
      *((char *) 0x000476BC) = 0x00000001;
    }
    sub_2FE08 ();
  }
  ra = ((int *) sp)[2];
  var10 = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D37C
 */
void sub_0D37C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  var4 = sceVshBridge_61001D64 (var1);
  var5 = 0x00000004;
  if (!(var4 != 0x00000000))
  {
    var5 = ((unsigned short *) sp)[1];
  }
  ra = ((int *) sp)[4];
  *((int *) 0x000476C0) = var5;
  *((char *) 0x000476BD) = 0x00000001;
  *((int *) 0x000476C4) = var4;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000D3C4
 */
int vsh_E261B0EE ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x000476BD);
  if (var1 == 0x00000000)
  {
    sub_0D37C ();
  }
  else
  {
  }
  var2 = *((int *) 0x000476C0);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x0000D400
 */
void vsh_7D02E234 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x000476BD);
  if (var1 == 0x00000000)
  {
    sub_0D37C ();
  }
  else
  {
  }
  var2 = *((int *) 0x000476C4);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D43C
 */
void sub_0D43C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_6439FDBC (0x000476C8, 0x00000000, 0x00000400);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D464
 */
int sub_0D464 (int arg1)
{
  return ((arg1 << 0x00000006) + 0x000476C8);
}

/**
 * Subroutine at address 0x0000D478
 */
void vsh_B5C7E005 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_3447707B (((arg1 << 0x00000006) + 0x000476C8), arg2, arg3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D4A0
 */
void vsh_B643726A (int arg1, int arg2, int arg3)
{
  var1 = (arg1 << 0x00000006) + 0x000476C8;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (!(((arg3 < 0x00000040)) != 0x00000000))
  {
  }
  scePaf_3447707B (arg2, var1, 0x00000040);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D4EC
 */
int sub_0D4EC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = IoFileMgrForUser_F27A9C51 (arg1);
  var4 = var3;
  var5 = (((var4 ^ 0x80010002)) ? var4 : 0x00000000);
  if (!(var4 < 0))
  {
    var8 = sceVshBridge_2380DC08 ("flashfat1:", 0x00005802, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    var5 = MIN (var8, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var5;
}

/**
 * Subroutine at address 0x0000D558
 */
void sub_0D558 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = IoFileMgrForUser_06A70004 (arg1, 0x000001FF);
  var4 = var3;
  if (!(var4 == 0x80280011))
  {
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D598
 */
int vsh_C3580990 (int arg1)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[79] = s3;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[81] = ra;
  ((int *) sp)[80] = s4;
  ((int *) sp)[78] = s2;
  ((int *) sp)[77] = s1;
  ((int *) sp)[76] = s0;
  sceVshCommonUtil_B3F4BEA8 (var2, 0x00000001);
  var5 = sp + 0x00000010;
  if ((var1 & 0x00000001) != 0x00000000)
  {
    sub_2FA1C ();
    scePaf_6439FDBC (var5, 0x00000000, 0x00000110);
    var98 = sp + 0x00000014;
    ((int *) sp)[4] = 0x00000001;
    scePaf_98DE3BA6 (var98, 0x000389D0);
    var103 = scePaf_967A56EF (0x000389D0);
    ((int *) sp)[69] = var103;
    ((int *) sp)[71] = 0x00000001;
    ((int *) sp)[70] = 0x00000001;
    var106 = sceReg_DEDA92BF (var5);
    var70 = var106;
    if (var106 != 0x00000000)
    {

    label56:
      var73 = sp;
      sceVshCommonUtil_B5C86FBB (var73);
      var10 = var70;
    }
    else
    {
      var109 = sceVshBridge_2380DC08 ("flashfat1:", 0x00005802, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      var70 = var109;
      if (var109 >= 0)
      {

      label20:
        if ((var1 & 0x00000002) != 0x00000000)
        {
          var93 = sub_0D4EC ();
          var70 = var93;
          if (var93 == 0x00000000)
          {

          label25:
            if ((var1 & 0x00000004) != 0x00000000)
            {
              var87 = sub_0D4EC ();
              var70 = var87;
              if (var87 != 0x00000000)
                goto label56;
              var90 = sub_0D4EC ();
              var70 = var90;
              if (var90 == 0x00000000)
              {

              label33:
                if ((var1 & 0x00000020) != 0x00000000)
                {
                  var84 = sub_0D4EC ();
                  var70 = var84;
                  if (var84 == 0x00000000)
                  {

                  label38:
                    if ((var1 & 0x00000008) != 0x00000000)
                    {
                      var78 = sub_0D4EC ();
                      var70 = var78;
                      if (var78 != 0x00000000)
                        goto label56;
                      var81 = sub_0D4EC ();
                      var70 = var81;
                      if (var81 == 0x00000000)
                      {

                      label46:
                        if ((var1 & 0x00000040) != 0x00000000)
                        {
                          sub_0B928 ();
                          var69 = sceMlnBridge_6DEA83B1 (0x4D79C16C, 0x00000000, 0x00000000);
                          var70 = var69;
                          sub_0B970 ();
                          if (!(var70 == 0x00000000))
                            goto label56;
                          var6 = var1 & 0x00000010;

                        label60:
                          if (var6 != 0x00000000)
                          {
                            sub_2FA1C ();
                            sub_0B8A0 ();
                            IoFileMgrForUser_6D08A871 (0x000388BC);
                            IoFileMgrForUser_6D08A871 (0x000388C4);
                            IoFileMgrForUser_6D08A871 (0x000388CC);
                            var28 = sceVshBridge_2EB0812A ();
                            if (var28 != 0x00000000)
                            {
                              IoFileMgrForUser_6D08A871 ("flash3:");
                            }
                            else
                            {
                            }
                            var29 = *((int *) 0x00038848);
                            var30 = *((int *) 0x00038844);
                            var31 = sp + 0x00000120;
                            ((int *) sp)[72] = var30;
                            ((int *) sp)[73] = var29;
                            sceVshBridge_74DA9D25 (0x00000002, var31);
                            ((int *) sp)[72] = "fatfmt";
                            ((int *) sp)[73] = "lflash0:0,2";
                            sceVshBridge_74DA9D25 (0x00000002, var31);
                            IoFileMgrForUser_B2A628C1 (0x000388BC, "lflash0:0,0", "flashfat0:", 0x00000001, 0x00000000, 0x00000000);
                            IoFileMgrForUser_B2A628C1 (0x000388C4, "lflash0:0,1", "flashfat1:", 0x00000000, 0x00000000, 0x00000000);
                            IoFileMgrForUser_B2A628C1 (0x000388CC, 0x000388DC, "flashfat2:", 0x00000000, 0x00000000, 0x00000000);
                            var44 = sceVshBridge_2EB0812A ();
                            if (var44 != 0x00000000)
                            {
                              IoFileMgrForUser_B2A628C1 ("flash3:", "lflash0:0,3", "flashfat3:", 0x00000001, 0x00000000, 0x00000000);
                            }
                            else
                            {
                            }
                            sub_0D558 ();
                            sub_0D558 ();
                            sub_0D558 ();
                            sub_0D558 ();
                            sub_0D558 ();
                            sub_0D558 ();
                            sub_0D558 ();
                            sub_0B8E8 ();
                          }
                          var7 = sp;
                          sceVshCommonUtil_B5C86FBB (var7);
                          var10 = 0x00000000;
                        }
                        else
                        {
                          var6 = var1 & 0x00000010;
                          goto label60;
                        }
                      }
                      else
                      {
                        goto label56;
                      }
                    }
                    else
                    goto label46;
                  }
                  else
                  {
                    goto label56;
                  }
                }
                else
                goto label38;
              }
              else
              {
                goto label56;
              }
            }
            else
            goto label33;
          }
          else
          {
            goto label56;
          }
        }
        else
        goto label25;
      }
      else
      {
        goto label56;
      }
    }
  }
  else
  goto label20;
  ra = ((int *) sp)[81];
  var11 = ((int *) sp)[80];
  var12 = ((int *) sp)[79];
  var13 = ((int *) sp)[78];
  var14 = ((int *) sp)[77];
  var15 = ((int *) sp)[76];
  sp = sp + 0x00000150;
  return var10;
}

/**
 * Subroutine at address 0x0000D93C
 */
void sub_0D93C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = ThreadManForUser_E81CAF8F ("SCE_VSH_ALARMCALLBACK", 0x0000D9C8, 0x00000000);
  *((int *) 0x00047AC8) = var3;
  var4 = var3;
  if (!(var3 < 0))
  {
    var7 = sceRtc_FB3B18CD (var3);
    var4 = MIN (var7, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D990
 */
void sub_0D990 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047AC8);
  ((int *) sp)[1] = ra;
  sceRtc_6A676D2D (var1);
  var4 = *((int *) 0x00047AC8);
  ThreadManForUser_EDBA5844 (var4);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D9C8
 */
void sub_0D9C8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2FF40 (arg2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D9E8
 */
void vsh_5EDB37F1 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  var1 = arg1;
  ((char *) arg1)[0] = 0x00000000;
  ((int *) var1)[1] = 0xFFFFFFFF;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) sp)[24] = s0;
  ((int *) sp)[27] = ra;
  var2 = sp;
  var5 = IoFileMgrForUser_ACE946E8 (arg2, var2);
  if (var5 == 0x00000000)
  {
    var11 = IoFileMgrForUser_109F50BC (arg2, 0x00000001, 0x000001FF);
    ((int *) var1)[1] = var11;
    if (!(var11 < 0))
    {
      var14 = sceVshCommonUtil_922DB51D (var11, (var1 + 0x00000008));
      if (var14 != 0x00000000)
      {
        var15 = ((int *) var1)[1];
        IoFileMgrForUser_810C4BC3 (var15);
        ((int *) var1)[1] = 0xFFFFFFFF;
      }
      else
      {
        ((char *) var1)[0] = 0x00000001;
      }
    }
  }
  ra = ((int *) sp)[27];
  var6 = ((int *) sp)[26];
  var7 = ((int *) sp)[25];
  var8 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0000DA8C
 */
void vsh_8AC9E9EB (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ((int *) var1)[1] = 0xFFFFFFFF;
  ((char *) var1)[0] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  if (arg2 == 0x00000000)
  {

  label7:
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = sceVshCommonUtil_79ACE8F4 (arg2, (arg1 + 0x00000008));
    ra = ((int *) sp)[1];
    if (!(var4 != 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
      goto label7;
    }
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DAEC
 */
void vsh_AE6CAD40 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ((int *) var1)[1] = 0xFFFFFFFF;
  ((char *) var1)[0] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  if (arg2 == 0x00000000)
  {

  label7:
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = sceVshCommonUtil_80311468 (arg2, arg3, (arg1 + 0x00000008));
    ra = ((int *) sp)[1];
    if (!(var4 != 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
      goto label7;
    }
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DB50
 */
void vsh_05BA46CE (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[2];
  if (var2 != 0x00000000)
  {
    sceVshCommonUtil_E05A087C (var2);
    var3 = ((int *) var1)[1];
  }
  else
  {
    var3 = ((int *) var1)[1];
  }
  if (!(var3 < 0))
  {
    IoFileMgrForUser_810C4BC3 (var3);
  }
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DBA0
 */
int vsh_AC6CA3B8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  var1 = 0xFFFFFC0E;
  ((int *) sp)[4] = s0;
  var2 = arg1;
  ((int *) sp)[7] = ra;
  var3 = ((int *) arg1)[2];
  ((int *) sp)[0] = arg2;
  if (!(var3 == 0x00000000))
  {
    var6 = sceVshCommonUtil_6BC2A336 (var3, arg2, (arg1 + 0x0000000C));
    var7 = sp + 0x00000008;
    var8 = sp + 0x00000004;
    var9 = sp;
    var1 = 0xFFFFFBE5;
    if (!(var6 != 0x00000000))
    {
      var10 = ((int *) var2)[2];
      var11 = ((int *) var2)[3];
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
      var14 = sceVshCommonUtil_3A1EA724 (var10, var11, var9, var8, var7);
      var1 = 0xFFFFFBE6;
      if (!(var14 != 0x00000000))
      {
        var15 = ((int *) sp)[1];
        var1 = 0xFFFFFC0D;
        if (!(((arg4 < var15)) != 0x00000000))
        {
          var16 = ((int *) var2)[3];
          var17 = ((int *) var2)[2];
          var20 = sceVshCommonUtil_652E90E0 (var17, var16, arg3);
          var1 = !(var20) ? 0x00000000 : 0xFFFFFBE5;
        }
      }
    }
  }
  ra = ((int *) sp)[7];
  var21 = ((int *) sp)[6];
  var22 = ((int *) sp)[5];
  var23 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x0000DC58
 */
int vsh_E7100874 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s3;
  var1 = 0xFFFFFC0E;
  ((int *) sp)[6] = s2;
  var2 = arg4;
  ((int *) sp)[5] = s1;
  var3 = arg1;
  ((int *) sp)[8] = ra;
  ((int *) sp)[4] = s0;
  var4 = ((int *) arg1)[2];
  ((int *) sp)[0] = arg2;
  if (!(var4 == 0x00000000))
  {
    var7 = sceVshCommonUtil_6BC2A336 (var4, arg2, (var3 + 0x0000000C));
    var1 = 0xFFFFFBE5;
    if (!(var7 != 0x00000000))
    {
      var8 = ((int *) var3)[2];
      var9 = ((int *) var3)[3];
      var10 = sp;
      var11 = sp + 0x00000004;
      var12 = sp + 0x00000008;
      var15 = sceVshCommonUtil_3A1EA724 (var8, var9, var10, var11, var12);
      var1 = 0xFFFFFBE6;
      if (!(var15 != 0x00000000))
      {
        var16 = ((int *) sp)[1];
        var1 = 0xFFFFFC0D;
        if (!(((var2 < var16)) != 0x00000000))
        {
          var19 = scePaf_7C66F326 (var16);
          var20 = var19;
          var1 = 0xFFFFFC17;
          if (!(var19 == 0x00000000))
          {
            var21 = ((int *) var3)[3];
            var22 = ((int *) var3)[2];
            var25 = sceVshCommonUtil_652E90E0 (var22, var21, var19);
            if (var25 != 0x00000000)
            {
              scePaf_19E81926 (var20);
              var1 = 0xFFFFFBE5;
            }
            else
            {
              var28 = scePaf_36E10086 (var20);
              if (((var2 < (var28 << 0x00000001))) != 0x00000000)
              {
                scePaf_19E81926 (var20);
                var1 = 0xFFFFFC0D;
              }
              else
              {
                var31 = scePaf_AF8BAECD (arg3, var2, var20);
                if (var28 != var31)
                {
                  scePaf_19E81926 (var20);
                  var1 = 0xFFFFFC16;
                }
                else
                {
                  scePaf_19E81926 (var20);
                  var1 = 0x00000000;
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[8];
  var34 = ((int *) sp)[7];
  var35 = ((int *) sp)[6];
  var36 = ((int *) sp)[5];
  var37 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var1;
}

/**
 * Subroutine at address 0x0000DD84
 */
int vsh_4F777346 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = scePaf_967A56EF (arg1);
  var5 = 0xFFFFFBD1;
  if (((var4 < 0x00000004)) != 0x00000000)
  {

  label14:
    ra = ((int *) sp)[1];
  }
  else
  {
    var6 = ((unsigned char *) var1)[0];
    if (((((var6 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
    {
      goto label14;
    }
    else
    {
      var7 = ((char *) var1)[1];
      if (!(var7 == 0x0000002E))
        goto label14;
      var9 = ((char *) var1)[2];
      if (((var9 < 0x00000030)) != 0x00000000)
        goto label14;
      ra = ((int *) sp)[1];
      if (!(((var9 < 0x0000003A)) == 0x00000000))
      {
        var10 = ((char *) var1)[3];
        if (!(((var10 < 0x00000030)) != 0x00000000))
        {
          if (!(((var10 < 0x0000003A)) == 0x00000000))
          {
            var5 = (((((char) var6) * 0x00000064) + (((var9 << 0x00000002) + var9) << 0x00000001)) + var10) + 0xFFFFEB30;
          }
        }
      }
    }
  }
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var5;
}

/**
 * Subroutine at address 0x0000DE30
 */
void vsh_2880DDA6 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = arg3;
  if (!((((arg1 < 0x00000001)) | ((arg2 < 0x00000005))) != 0x00000000))
  {
    var2 = arg3 >> 0x0000001F;
    if (!(((arg3 < 0x000003E8)) == 0x00000000))
    {
      var3 = ((hi (var1 * 0x51EB851F)) >> 0x00000005) - var2;
      var4 = var1 - (var3 * 0x00000064);
      var5 = ((hi (var1 * 0x66666667)) >> 0x00000002) - var2;
      scePaf_CDDCFFB3 (arg1, arg2, 0x00038A00, var3, (((hi (var4 * 0x66666667)) >> 0x00000002) - (var4 >> 0x0000001F)), (var1 - (((var5 << 0x00000002) + var5) << 0x00000001)));
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DEE0
 */
void sub_0DEE0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  IoFileMgrForUser_810C4BC3 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DEFC
 */
void sub_0DEFC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  IoFileMgrForUser_810C4BC3 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DF18
 */
void sub_0DF18 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshCommonUtil_E05A087C (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DF34
 */
void sub_0DF34 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshCommonUtil_E05A087C (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DF50
 */
void sub_0DF50 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_22FB4177 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DF6C
 */
void sub_0DF6C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_22FB4177 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DF88
 */
int sub_0DF88 (int arg1)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[57] = ra;
  ((int *) sp)[55] = s3;
  var1 = sp;
  ((int *) sp)[54] = s2;
  ((int *) sp)[53] = s1;
  ((int *) sp)[52] = s0;
  ((int *) sp)[56] = s4;
  var2 = 0x00000004;
  while (1) {
    var2 = var2 + 0xFFFFFFFF;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[3] = 0x00000000;
    ((int *) var1)[4] = 0x00000000;
    ((int *) var1)[6] = 0x00000000;
    ((int *) var1)[7] = 0x00000000;
    var1 = var1 + 0x00000024;
    if (var2 != 0xFFFFFFFF)
      continue;
    break;
  }
  var3 = sp;
  var6 = vsh_72193F87 (var3);
  var7 = 0x00000000;
  var8 = sp;
  if (var6 < 0)
  {
    var41 = sp;
    var42 = sp + 0x000000B4;
    while (1) {
      var15 = var6;
      if (var41 == var42)
        break;
      var42 = var42 + 0xFFFFFFDC;
      sub_317D8 ((var42 + 0x00000018));
      sub_317D8 ((var42 + 0x0000000C));
      sub_317D8 (var42);
      continue;
    }
  }
  else
  {
    var9 = ((int *) var8)[0];
    while (1) {
      var10 = *((char *) 0x00038A10);
      var11 = ((char *) var9)[0];
      var8 = var8 + 0x00000024;
      var12 = 0x00000000;
      if (var11 == var10)
      {
        var40 = scePaf_E3D530AE (var9, "release");
        var12 = (var40 < 0x00000001);
      }
      if (var12 != 0x00000000)
        break;
      var7 = var7 + 0x00000001;
      if (((var7 < 0x00000005)) != 0x00000000)
      {
        var9 = ((int *) var8)[0];
        continue;
      }
      else
      {
        var13 = sp;
        goto label38;
      }
      goto label40;
    }
    if (((var7 < 0x00000005)) == 0x00000000)
    {
      var13 = sp;

    label38:
      var14 = sp + 0x000000B4;
      while (1) {
        var15 = 0x80108101;
        if (var13 == var14)
          break;
        var14 = var14 + 0xFFFFFFDC;
        sub_317D8 ((var14 + 0x00000018));
        sub_317D8 ((var14 + 0x0000000C));
        sub_317D8 (var14);
        continue;
      }
    }
    else
    {
      var27 = sp + (((var7 << 0x00000003) + var7) << 0x00000002);
      sub_31940 (arg1, (var27 + 0x0000000C));
      var30 = sp;
      var31 = sp + 0x000000B4;
      while (1) {
        var15 = 0x00000000;
        if (var30 == var31)
          break;
        var31 = var31 + 0xFFFFFFDC;
        sub_317D8 ((var31 + 0x00000018));
        sub_317D8 ((var31 + 0x0000000C));
        sub_317D8 (var31);
        continue;
      }
    }
  }

label40:
  ra = ((int *) sp)[57];
  var22 = ((int *) sp)[56];
  var23 = ((int *) sp)[55];
  var24 = ((int *) sp)[54];
  var25 = ((int *) sp)[53];
  var26 = ((int *) sp)[52];
  sp = sp + 0x000000F0;
  return var15;
}

/**
 * Subroutine at address 0x0000E124
 */
int vsh_C04BE20F (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = ra;
  var1 = 0x00038A18;
  var2 = sp;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  ((int *) sp)[12] = s0;
  ((int *) sp)[15] = s3;
  while (1) {
    var3 = ((int *) var1)[0];
    var4 = ((int *) var1)[1];
    var5 = ((int *) var1)[2];
    var6 = ((int *) var1)[3];
    ((int *) var2)[0] = var3;
    var1 = var1 + 0x00000010;
    var2 = var2 + 0x00000010;
    ((int *) var2)[1073741821] = var4;
    ((int *) var2)[1073741822] = var5;
    ((int *) var2)[1073741823] = var6;
    if (var1 != 0x00038A48)
      continue;
    break;
  }
  var7 = 0x00000000;
  var8 = sp;
  while (1) {
    var9 = ((int *) var8)[0];
    var7 = var7 + 0x00000001;
    var12 = sceVshBridge_5C2983C2 (0x00000000, var9);
    if (var12 == 0x00000001)
    {
      var18 = ((int *) var8)[0];
      var13 = 0x00000001;
      if (!((arg1 & (var12 << var18)) == 0x00000000))
        break;

    label10:
      var8 = var8 + 0x00000004;
      if (((var7 < 0x0000000C)) != 0x00000000)
        continue;
      var13 = 0x00000000;
      ra = ((int *) sp)[16];
    }
    else
    goto label10;
    goto label12;
  }
  ra = ((int *) sp)[16];

label12:
  var14 = ((int *) sp)[15];
  var15 = ((int *) sp)[14];
  var16 = ((int *) sp)[13];
  var17 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var13;
}

/**
 * Subroutine at address 0x0000E1EC
 */
int vsh_D45A92CB (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFEF0;
  ((int *) sp)[64] = ra;
  var1 = sp;
  ((int *) sp)[58] = s2;
  ((int *) sp)[57] = s1;
  ((int *) sp)[56] = s0;
  ((int *) sp)[60] = s4;
  ((int *) sp)[63] = s7;
  var2 = arg4;
  ((int *) sp)[62] = s6;
  ((int *) sp)[61] = s5;
  var3 = arg2;
  ((int *) sp)[59] = s3;
  var4 = arg1;
  var5 = 0x00000004;
  while (1) {
    var5 = var5 + 0xFFFFFFFF;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[3] = 0x00000000;
    ((int *) var1)[4] = 0x00000000;
    ((int *) var1)[6] = 0x00000000;
    ((int *) var1)[7] = 0x00000000;
    var1 = var1 + 0x00000024;
    if (var5 != 0xFFFFFFFF)
      continue;
    break;
  }
  var6 = sp;
  var9 = vsh_72193F87 (var6);
  var10 = 0x00000000;
  var11 = sp;
  if (var9 < 0)
  {
    vsh_E5463CE5 (0x00000002);
    var119 = sp;
    var120 = sp + 0x000000B4;
    while (1) {
      var20 = 0x00000009;
      if (var119 == var120)
        break;
      var120 = var120 + 0xFFFFFFDC;
      sub_317D8 ((var120 + 0x00000018));
      sub_317D8 ((var120 + 0x0000000C));
      sub_317D8 (var120);
      continue;
    }
  }
  else
  {
    var12 = ((int *) var11)[0];
    while (1) {
      var13 = *((char *) 0x00038A10);
      var14 = ((char *) var12)[0];
      var11 = var11 + 0x00000024;
      var15 = 0x00000000;
      if (var14 == var13)
      {
        var116 = scePaf_E3D530AE (var12, "release");
        var15 = (var116 < 0x00000001);
      }
      if (var15 != 0x00000000)
      {
        var35 = sp + 0x000000D0;
        if (((var10 < 0x00000005)) == 0x00000000)
          goto label108;
        var36 = sp + (((var10 << 0x00000003) + var10) << 0x00000002);
        ((int *) sp)[52] = 0x00000000;
        ((int *) sp)[53] = 0x00000000;
        sub_31940 (var35, (var36 + 0x0000000C));
        var39 = ((int *) sp)[53];
        var40 = ((int *) sp)[52];
        if (((var39 < 0x00000004)) != 0x00000000)
        {
          sub_317D8 (var35);
          var106 = sp;
          var107 = sp + 0x000000B4;
          while (1) {
            var20 = 0x00000002;
            if (var106 == var107)
              break;
            var107 = var107 + 0xFFFFFFDC;
            sub_317D8 ((var107 + 0x00000018));
            sub_317D8 ((var107 + 0x0000000C));
            sub_317D8 (var107);
            continue;
          }
        }
        else
        {
          var41 = ((char *) var40)[0];
          if (((var41 < 0x00000030)) != 0x00000000)
          {

          label95:
            sub_317D8 (var35);
            var45 = sp;
            var46 = sp + 0x000000B4;
            while (1) {
              var20 = 0x00000002;
              if (var45 == var46)
                break;
              var46 = var46 + 0xFFFFFFDC;
              sub_317D8 ((var46 + 0x00000018));
              sub_317D8 ((var46 + 0x0000000C));
              sub_317D8 (var46);
              continue;
            }
          }
          else
          {
            if (((var41 < 0x0000003A)) == 0x00000000)
              goto label95;
            var42 = ((char *) var40)[1];
            if (!(var42 == 0x0000002E))
              goto label95;
            var53 = ((char *) var40)[2];
            if (((var53 < 0x00000030)) != 0x00000000)
              goto label95;
            if (((var53 < 0x0000003A)) == 0x00000000)
              goto label95;
            var54 = ((char *) var40)[3];
            if (((var54 < 0x00000030)) != 0x00000000)
              goto label95;
            if (((var54 < 0x0000003A)) == 0x00000000)
              goto label95;
            ((int *) var2)[0] = ((((var41 * 0x00000064) + (((var53 << 0x00000002) + var53) << 0x00000001)) + var54) + 0xFFFFEB30);
            var55 = ((char *) var4)[0];
            var56 = ((char *) var4)[2];
            var57 = ((char *) var4)[3];
            var58 = (((var55 * 0x00000064) + (((var56 << 0x00000002) + var56) << 0x00000001)) + var57) + 0xFFFFEB30;
            ((int *) arg3)[0] = var58;
            var59 = ((int *) var2)[0];
            if (((var59 < var58)) != 0x00000000)
            {
              sub_317D8 (var35);
              var96 = sp;
              var97 = sp + 0x000000B4;
              while (1) {
                var20 = 0x00000003;
                if (var96 == var97)
                  break;
                var97 = var97 + 0xFFFFFFDC;
                sub_317D8 ((var97 + 0x00000018));
                sub_317D8 ((var97 + 0x0000000C));
                sub_317D8 (var97);
                continue;
              }
            }
            else
            {
              if (var3 == 0x00000000)
              {

              label84:
                sub_317D8 (var35);
                var66 = sp;
                var67 = sp + 0x000000B4;
                while (1) {
                  var20 = 0x00000000;
                  if (var66 == var67)
                    break;
                  var67 = var67 + 0xFFFFFFDC;
                  sub_317D8 ((var67 + 0x00000018));
                  sub_317D8 ((var67 + 0x0000000C));
                  sub_317D8 (var67);
                  continue;
                }
              }
              else
              {
                var60 = ((char *) var3)[0];
                var61 = ((char *) var3)[2];
                var62 = ((char *) var3)[3];
                var63 = (((var60 * 0x00000064) + (((var61 << 0x00000002) + var61) << 0x00000001)) + var62) + 0xFFFFEB30;
                if (var59 == var63)
                {
                  sub_317D8 (var35);
                  var86 = sp;
                  var87 = sp + 0x000000B4;
                  while (1) {
                    var20 = 0x00000007;
                    if (var86 == var87)
                      break;
                    var87 = var87 + 0xFFFFFFDC;
                    sub_317D8 ((var87 + 0x00000018));
                    sub_317D8 ((var87 + 0x0000000C));
                    sub_317D8 (var87);
                    continue;
                  }
                }
                else
                {
                  if (!(((var63 < var59)) != 0x00000000))
                    goto label84;
                  sub_317D8 (var35);
                  var76 = sp;
                  var77 = sp + 0x000000B4;
                  while (1) {
                    var20 = 0x00000008;
                    if (var76 == var77)
                      break;
                    var77 = var77 + 0xFFFFFFDC;
                    sub_317D8 ((var77 + 0x00000018));
                    sub_317D8 ((var77 + 0x0000000C));
                    sub_317D8 (var77);
                    continue;
                  }
                }
              }
            }
          }
        }
      }
      else
      {
        var10 = var10 + 0x00000001;
        if (!(((var10 < 0x00000005)) != 0x00000000))
          break;
        var12 = ((int *) var11)[0];
        continue;
      }
      goto label112;
    }

  label108:
    vsh_E5463CE5 (0x00000002);
    var18 = sp;
    var19 = sp + 0x000000B4;
    while (1) {
      var20 = 0x00000009;
      if (var18 == var19)
        break;
      var19 = var19 + 0xFFFFFFDC;
      sub_317D8 ((var19 + 0x00000018));
      sub_317D8 ((var19 + 0x0000000C));
      sub_317D8 (var19);
      continue;
    }
  }

label112:
  ra = ((int *) sp)[64];
  var27 = ((int *) sp)[63];
  var28 = ((int *) sp)[62];
  var29 = ((int *) sp)[61];
  var30 = ((int *) sp)[60];
  var31 = ((int *) sp)[59];
  var32 = ((int *) sp)[58];
  var33 = ((int *) sp)[57];
  var34 = ((int *) sp)[56];
  sp = sp + 0x00000110;
  return var20;
}

/**
 * Subroutine at address 0x0000E610
 */
int sub_0E610 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var2 = arg1;
  var5 = sceVshCommonUtil_6BC2A336 (arg1, arg2, var1);
  var6 = var5;
  var7 = sp + 0x00000004;
  var8 = sp + 0x00000008;
  var9 = sp + 0x0000000C;
  if (var5 == 0x00000000)
  {
    var12 = ((int *) sp)[0];
    var15 = sceVshCommonUtil_3A1EA724 (var2, var12, var7, var8, var9);
    var6 = var15;
    if (!(var15 != 0x00000000))
    {
      var16 = ((int *) sp)[2];
      var6 = 0xFFFFFFFF;
      if (!(var16 != 0x00000004))
      {
        var17 = ((int *) sp)[3];
        if (!(var17 != var16))
        {
          var18 = ((int *) sp)[0];
          var21 = sceVshCommonUtil_652E90E0 (var2, var18, arg3);
          var6 = var21;
        }
      }
    }
  }
  ra = ((int *) sp)[6];
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x0000E6A0
 */
int sub_0E6A0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  var1 = sp;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[7] = ra;
  var2 = arg1;
  var5 = sceVshCommonUtil_6BC2A336 (arg1, arg2, var1);
  var6 = var5;
  var7 = sp + 0x00000004;
  var8 = sp + 0x00000008;
  var9 = sp + 0x0000000C;
  if (var5 == 0x00000000)
  {
    var13 = ((int *) sp)[0];
    var16 = sceVshCommonUtil_3A1EA724 (var2, var13, var7, var8, var9);
    var6 = var16;
    if (!(var16 != 0x00000000))
    {
      var17 = ((int *) sp)[2];
      var6 = 0xFFFFFFFF;
      if (!(((arg4 < var17)) != 0x00000000))
      {
        var18 = ((int *) sp)[0];
        var21 = sceVshCommonUtil_652E90E0 (var2, var18, arg3);
        var6 = var21;
      }
    }
  }
  ra = ((int *) sp)[7];
  var10 = ((int *) sp)[6];
  var11 = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x0000E734
 */
int sub_0E734 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var3 = sub_0E768 ();
  var6 = sceUmdUser_46EBB729 ();
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return (!(var6) ? 0x00000001 : var3);
}

/**
 * Subroutine at address 0x0000E768
 */
int sub_0E768 ()
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[46] = ra;
  ((int *) sp)[45] = s1;
  ((int *) sp)[44] = s0;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  var3 = sub_2DA4C ();
  if (var3 == 0x00000004)
  {

  label158:
    var37 = sp;
    sub_317D8 (var37);
    var40 = 0x00000002;
  }
  else
  {
    var6 = IoFileMgrForUser_109F50BC ("disc0:/PSP_GAME/PARAM.SFO", 0x00000001, 0x00000000);
    if (var6 < 0)
      goto label158;
    var7 = sp + 0x00000090;
    ((int *) sp)[8] = 0x0000DEE0;
    ((int *) sp)[9] = var6;
    var10 = sceVshCommonUtil_922DB51D (var6, var7);
    var11 = ((int *) sp)[36];
    if (var10 != 0x00000000)
    {

    label153:
      var36 = ((int *) sp)[8];

    label154:
      if (var36 != 0x00000000)
      {
        var43 = ((int *) sp)[9];
        var46 var47 = (*var36) (var43);
      }
      goto label158;
    }
    else
    {
      var12 = sp + 0x00000040;
      ((int *) sp)[12] = 0x0000DF18;
      ((int *) sp)[13] = var11;
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[17] = 0x00000000;
      ((int *) sp)[18] = 0x00000000;
      ((char *) sp)[76] = 0x00000000;
      var15 = sub_0E6A0 (var11, "DISC_ID", var12, 0x0000000D);
      if (var15 != 0x00000000)
      {
        var196 = ((char *) sp)[76];

      label148:
        var35 = ((int *) sp)[12];

      label149:
        if (!(var35 != 0x00000000))
          goto label153;
        var48 = ((int *) sp)[13];
        var51 var52 = (*var35) (var48);
        var36 = ((int *) sp)[8];
        goto label154;
      }
      else
      {
        var16 = ((char *) sp)[76];
        var17 = ((int *) sp)[36];
        if (var16 != 0x00000000)
          goto label148;
        var18 = sp + 0x00000094;
        var21 = sub_0E610 (var17, "REGION", var18);
        var22 = ((int *) sp)[36];
        if (var21 != 0x00000000)
          goto label148;
        var23 = sp + 0x00000098;
        var26 = sub_0E610 (var22, "BOOTABLE", var23);
        var27 = ((int *) sp)[36];
        if (var26 != 0x00000000)
          goto label148;
        var28 = sp + 0x00000050;
        var31 = sub_0E6A0 (var27, "CATEGORY", var28, 0x00000004);
        var32 = ((char *) sp)[80];
        if (var31 != 0x00000000)
          goto label148;
        if (var32 != 0x00000055)
        {
          var195 = ((char *) sp)[81];
          goto label148;
        }
        else
        {
          var33 = ((char *) sp)[81];
          if (var33 == 0x00000047)
          {
            var53 = ((char *) sp)[82];
            if (var53 != 0x00000000)
            {
              var35 = ((int *) sp)[12];
              goto label149;
            }
            else
            {
              var54 = ((int *) sp)[12];
              var55 = ((int *) sp)[36];
              var56 = sp + 0x00000060;
              var59 = sub_0E6A0 (var55, "PSP_SYSTEM_VER", var56, 0x00000008);
              if (var59 == 0x00000000)
              {

              label37:
                var62 = sp;
                var65 = sub_0DF88 (var62);
                if (var65 < 0)
                {
                  vsh_E5463CE5 (0x00000002);
                  var180 = ((int *) sp)[12];
                  if (var180 != 0x00000000)
                  {
                    var190 = ((int *) sp)[13];
                    var193 var194 = (*var180) (var190);
                    var181 = ((int *) sp)[8];
                  }
                  else
                  {
                    var181 = ((int *) sp)[8];
                  }
                  if (var181 != 0x00000000)
                  {
                    var185 = ((int *) sp)[9];
                    var188 var189 = (*var181) (var185);
                  }
                  var182 = sp;
                  sub_317D8 (var182);
                  var40 = 0x00000009;
                }
                else
                {
                  var68 = scePaf_967A56EF (var56);
                  var69 = ((unsigned char *) sp)[96];
                  if (((var68 < 0x00000004)) != 0x00000000)
                    goto label148;
                  var70 = ((char *) sp)[97];
                  if (((((var69 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
                    goto label148;
                  if (var70 != 0x0000002E)
                  {
                    var35 = ((int *) sp)[12];
                    goto label149;
                  }
                  else
                  {
                    var71 = ((int *) sp)[12];
                    var72 = ((char *) sp)[98];
                    if (((var72 < 0x00000030)) != 0x00000000)
                    {
                      var35 = ((int *) sp)[12];
                      goto label149;
                    }
                    else
                    {
                      var73 = ((int *) sp)[12];
                      if (((var72 < 0x0000003A)) == 0x00000000)
                      {
                        var35 = ((int *) sp)[12];
                        goto label149;
                      }
                      else
                      {
                        var74 = ((int *) sp)[12];
                        var75 = ((char *) sp)[99];
                        if (((var75 < 0x00000030)) != 0x00000000)
                        {
                          var35 = ((int *) sp)[12];
                          goto label149;
                        }
                        else
                        {
                          var76 = ((int *) sp)[12];
                          if (((var75 < 0x0000003A)) == 0x00000000)
                          {
                            var35 = ((int *) sp)[12];
                            goto label149;
                          }
                          else
                          {
                            var77 = ((int *) sp)[12];
                            var78 = ((int *) sp)[0];
                            var79 = ((char *) var78)[0];
                            var80 = ((char *) var78)[2];
                            var81 = ((char *) var78)[3];
                            var82 = ((var80 << 0x00000002) + var80) << 0x00000001;
                            var83 = ((int *) sp)[38];
                            if (((((((var79 * 0x00000064) + var82) + var81) + 0xFFFFEB30) < ((((((char) var69) * 0x00000064) + (((var72 << 0x00000002) + var72) << 0x00000001)) + var75) + 0xFFFFEB30))) != 0x00000000)
                            {
                              var163 = ((int *) sp)[12];
                              if (var163 != 0x00000000)
                              {
                                var173 = ((int *) sp)[13];
                                var176 var177 = (*var163) (var173, var82, var78, var81, 0x00000064, var72, var75);
                                var164 = ((int *) sp)[8];
                              }
                              else
                              {
                                var164 = ((int *) sp)[8];
                              }
                              if (var164 != 0x00000000)
                              {
                                var168 = ((int *) sp)[9];
                                var171 var172 = (*var164) (var168, var82, var78, var81, 0x00000064, var72, var75);
                              }
                              var165 = sp;
                              sub_317D8 (var165);
                              var40 = 0x00000003;
                            }
                            else
                            {
                              var84 = ((int *) sp)[36];
                              if (var83 != 0x00000001)
                              {
                                var148 = ((int *) sp)[12];
                                if (var148 != 0x00000000)
                                {
                                  var158 = ((int *) sp)[13];
                                  var161 var162 = (*var148) (var158, var82, var78, var81, 0x00000064, var72, var75);
                                  var149 = ((int *) sp)[8];
                                }
                                else
                                {
                                  var149 = ((int *) sp)[8];
                                }
                                if (var149 != 0x00000000)
                                {
                                  var153 = ((int *) sp)[9];
                                  var156 var157 = (*var149) (var153, var82, var78, var81, 0x00000064, var72, var75);
                                }
                                var150 = sp;
                                sub_317D8 (var150);
                                var40 = 0x00000004;
                              }
                              else
                              {
                                var85 = sp + 0x0000009C;
                                var88 = sub_0E610 (var84, "PARENTAL_LEVEL", var85);
                                if (var88 == 0x00000000)
                                {

                                label100:
                                  var90 = sp + 0x00000070;
                                  sceVshCommonUtil_D87E8E2D (var90, "/CONFIG/SYSTEM/LOCK");
                                  var93 = sp + 0x000000A0;
                                  var96 = sceVshCommonUtil_7A73DC84 (var90, "parental_level", var93);
                                  var97 = ((int *) sp)[39];
                                  var98 = ((int *) sp)[40];
                                  var99 = !(var96) ? var98 : 0x00000000;
                                  ((int *) sp)[40] = var99;
                                  if (!(((var97 < 0x0000000C)) != 0x00000000))
                                  {
                                    ((int *) sp)[39] = 0x0000000B;
                                  }
                                  var100 = ((int *) sp)[0];
                                  ((int *) sp)[40] = (!(((var99 < 0x00000000))) ? var99 : 0x00000000);
                                  sceVshBridge_AA2605A0 (var12, 0x0000000B, var100);
                                  var103 = ((int *) sp)[39];
                                  var104 = ((int *) sp)[40];
                                  if (var103 == 0x00000000)
                                  {

                                  label125:
                                    var105 = ((int *) sp)[36];

                                  label126:
                                    var106 = sp + 0x000000A4;
                                    var109 = sub_0E610 (var105, "AB_FLAG", var106);
                                    var110 = ((int *) sp)[41];
                                    if (!(var109 != 0x00000000))
                                    {
                                      if (var110 == 0x00000002)
                                      {
                                        var130 = vsh_C3580990 (0x0000006F);
                                      }
                                    }
                                    sceVshCommonUtil_625A9A5D (var90);
                                    var113 = ((int *) sp)[12];
                                    if (var113 != 0x00000000)
                                    {
                                      var123 = ((int *) sp)[13];
                                      var126 var127 = (*var113) (var123);
                                      var114 = ((int *) sp)[8];
                                    }
                                    else
                                    {
                                      var114 = ((int *) sp)[8];
                                    }
                                    if (var114 != 0x00000000)
                                    {
                                      var118 = ((int *) sp)[9];
                                      var121 var122 = (*var114) (var118);
                                    }
                                    var115 = sp;
                                    sub_317D8 (var115);
                                    var40 = 0x00000000;
                                  }
                                  else
                                  {
                                    var105 = ((int *) sp)[36];
                                    if (var104 == 0x00000000)
                                      goto label126;
                                    if (!(((var104 < var103)) != 0x00000000))
                                      goto label125;
                                    sceVshCommonUtil_625A9A5D (var90);
                                    var133 = ((int *) sp)[12];
                                    if (var133 != 0x00000000)
                                    {
                                      var143 = ((int *) sp)[13];
                                      var146 var147 = (*var133) (var143);
                                      var134 = ((int *) sp)[8];
                                    }
                                    else
                                    {
                                      var134 = ((int *) sp)[8];
                                    }
                                    if (var134 != 0x00000000)
                                    {
                                      var138 = ((int *) sp)[9];
                                      var141 var142 = (*var134) (var138);
                                    }
                                    var135 = sp;
                                    sub_317D8 (var135);
                                    var40 = 0x00000005;
                                  }
                                }
                                else
                                {
                                  if (var88 != 0x80120005)
                                  {
                                    var35 = ((int *) sp)[12];
                                    goto label149;
                                  }
                                  else
                                  {
                                    var89 = ((int *) sp)[12];
                                    ((int *) sp)[39] = 0x00000000;
                                    goto label100;
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
              else
              {
                if (var59 != 0x80120005)
                  goto label148;
                scePaf_98DE3BA6 (var56, "1.00");
                goto label37;
              }
            }
          }
          else
          {
            var34 = ((char *) sp)[82];
            goto label148;
          }
        }
      }
    }
  }
  ra = ((int *) sp)[46];
  var41 = ((int *) sp)[45];
  var42 = ((int *) sp)[44];
  sp = sp + 0x000000C0;
  return var40;
}

/**
 * Subroutine at address 0x0000EC80
 */
void vsh_4346A7A4 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFCE0;
  ((int *) sp)[198] = s6;
  var1 = arg3;
  ((int *) sp)[197] = s5;
  var2 = arg4;
  ((int *) sp)[194] = s2;
  var3 = arg5;
  ((int *) sp)[193] = s1;
  var4 = arg2 & 0x000000FF;
  ((int *) sp)[192] = s0;
  ((int *) sp)[199] = ra;
  ((int *) sp)[196] = s4;
  ((int *) sp)[195] = s3;
  var7 = IoFileMgrForUser_109F50BC (arg1, 0x00000001, 0x00000000);
  var8 = var7;
  if (!(var8 < 0))
  {
    var9 = sp;
    ((int *) sp)[12] = 0x0000DEE0;
    ((int *) sp)[13] = var8;
    var12 = IoFileMgrForUser_6A638D83 (var8, var9, 0x00000028);
    var13 = var12;
    if (var13 != 0x00000028)
    {
      var303 = ((char *) sp)[0];

    label270:
      var17 = ((int *) sp)[12];

    label271:
      if (var17 != 0x00000000)
      {
        var25 = ((int *) sp)[13];
        var28 var29 = (*var17) (var25, var13);
      }
      else
      {
      }
    }
    else
    {
      var14 = ((char *) sp)[0];
      if (var14 != 0x00000000)
      {
        goto label270;
      }
      else
      {
        var15 = ((char *) sp)[1];
        var16 = ((char *) sp)[2];
        if (!(var15 == 0x00000050))
          goto label270;
        if (var16 != 0x00000042)
        {
          var17 = ((int *) sp)[12];
          goto label271;
        }
        else
        {
          var30 = ((int *) sp)[12];
          var31 = ((char *) sp)[3];
          if (var31 != var15)
          {
            var17 = ((int *) sp)[12];
            goto label271;
          }
          else
          {
            var32 = ((int *) sp)[12];
            var33 = ((int *) sp)[3];
            var34 = ((int *) sp)[2];
            var35 = var33 - var34;
            if (((var34 < var33)) == 0x00000000)
              goto label270;
            if (((var35 < 0x00001401)) == 0x00000000)
            {
              var17 = ((int *) sp)[12];
              goto label271;
            }
            else
            {
              var36 = ((int *) sp)[12];
              var39 = scePaf_6CEA048C (var35);
              var40 = var39;
              if (var39 == 0x00000000)
                goto label270;
              var41 = ((int *) sp)[2];
              ((int *) sp)[16] = 0x0000DF50;
              ((int *) sp)[17] = var40;
              var44 var45 = IoFileMgrForUser_27EB27B8 (var8);
              if (var45 < 0)
              {

              label264:
                var88 = ((int *) sp)[16];

              label265:
                if (var88 == 0x00000000)
                {
                  var17 = ((int *) sp)[12];
                }
                else
                {
                  var89 = ((int *) sp)[17];
                  var92 var93 = (*var88) (var89);
                  var17 = ((int *) sp)[12];
                }
                goto label271;
              }
              else
              {
                var48 = IoFileMgrForUser_6A638D83 (var8, var40, var35);
                if (var48 != var35)
                  goto label264;
                var49 = sp + 0x000002E0;
                var52 = sceVshCommonUtil_80311468 (var40, var48, var49);
                var53 = ((int *) sp)[184];
                if (var52 != 0x00000000)
                  goto label264;
                ((int *) sp)[20] = 0x0000DF18;
                ((int *) sp)[21] = var53;
                ((int *) sp)[24] = 0x00000000;
                ((int *) sp)[25] = 0x00000000;
                ((int *) sp)[26] = 0x00000000;
                ((char *) sp)[108] = 0x00000000;
                if (var4 != 0x00000000)
                {

                label37:
                  var59 = sp + 0x000002E4;
                  var62 = sub_0E610 (var53, "REGION", var59);
                  if (var62 != 0x00000000)
                  {
                    var87 = ((int *) sp)[20];

                  label260:
                    if (!(var87 != 0x00000000))
                      goto label264;
                    var94 = ((int *) sp)[21];
                    var97 var98 = (*var87) (var94);
                    var88 = ((int *) sp)[16];
                    goto label265;
                  }
                  else
                  {
                    var63 = ((int *) sp)[20];
                    var64 = ((int *) sp)[185];
                    var67 = vsh_C04BE20F (var64);
                    var68 = ((int *) sp)[184];
                    if (var67 <= 0)
                    {
                      var284 = ((int *) sp)[20];
                      if (var284 != 0x00000000)
                      {
                        var297 = ((int *) sp)[21];
                        var300 var301 = (*var284) (var297);
                        var285 = ((int *) sp)[16];
                      }
                      else
                      {
                        var285 = ((int *) sp)[16];
                      }
                      if (var285 != 0x00000000)
                      {
                        var292 = ((int *) sp)[17];
                        var295 var296 = (*var285) (var292);
                        var286 = ((int *) sp)[12];
                      }
                      else
                      {
                        var286 = ((int *) sp)[12];
                      }
                      if (var286 != 0x00000000)
                      {
                        var287 = ((int *) sp)[13];
                        var290 var291 = (*var286) (var287);
                      }
                      else
                      {
                      }
                    }
                    else
                    {
                      var69 = sp + 0x000002E8;
                      var72 = sub_0E610 (var68, "BOOTABLE", var69);
                      var73 = ((int *) sp)[184];
                      if (var72 != 0x00000000)
                      {

                      label259:
                        var87 = ((int *) sp)[20];
                        goto label260;
                      }
                      else
                      {
                        var74 = sp + 0x00000070;
                        var77 = sub_0E6A0 (var73, "CATEGORY", var74, 0x00000004);
                        var78 = ((unsigned char *) sp)[112];
                        if (var77 != 0x00000000)
                          goto label259;
                        if (((char) var78) == 0x0000004D)
                        {
                          var282 = ((char *) sp)[113];
                          if (var282 != 0x00000047)
                          {
                            var80 = (char) var78;

                          label73:

                          label74:
                            if (var80 == 0x0000004D)
                            {
                              var280 = ((char *) sp)[113];
                              if (var280 != 0x00000045)
                              {
                                var82 = (char) var78;

                              label82:

                              label83:
                                if (var82 == 0x0000004D)
                                {
                                  var278 = ((char *) sp)[113];
                                  if (var278 != 0x0000004C)
                                  {
                                    var84 = (char) var78;

                                  label91:

                                  label92:
                                    if (var84 != 0x00000045)
                                    {
                                      var277 = ((char *) sp)[113];
                                      goto label259;
                                    }
                                    else
                                    {
                                      var85 = ((char *) sp)[113];
                                      if (var85 == 0x00000047)
                                      {
                                        var99 = ((char *) sp)[114];
                                        if (var99 != 0x00000000)
                                        {
                                          var87 = ((int *) sp)[20];
                                          goto label260;
                                        }
                                        else
                                        {
                                          var100 = ((int *) sp)[20];
                                          var101 = 0x00000003;

                                        label99:
                                          ((int *) var3)[0] = var101;

                                        label100:
                                          var102 = ((int *) sp)[184];
                                          var103 = sp + 0x00000080;
                                          var106 = sub_0E6A0 (var102, "PSP_SYSTEM_VER", var103, 0x00000008);
                                          if (var106 == 0x00000000)
                                          {

                                          label107:
                                            var109 = var103;
                                            if (var4 == 0x00000000)
                                            {
                                              var116 = var1;
                                              var117 = var2;
                                              var115 = 0x00000000;

                                            label113:
                                              var120 = vsh_D45A92CB (var109, var115, var116, var117);
                                              var121 = var120;
                                              if (var120 == 0x00000000)
                                              {
                                                var140 = ((int *) sp)[186];
                                                var141 = ((int *) sp)[184];
                                                if (var140 != 0x00000001)
                                                {
                                                  var259 = ((int *) sp)[20];
                                                  if (var259 != 0x00000000)
                                                  {
                                                    var272 = ((int *) sp)[21];
                                                    var275 var276 = (*var259) (var272);
                                                    var260 = ((int *) sp)[16];
                                                  }
                                                  else
                                                  {
                                                    var260 = ((int *) sp)[16];
                                                  }
                                                  if (var260 != 0x00000000)
                                                  {
                                                    var267 = ((int *) sp)[17];
                                                    var270 var271 = (*var260) (var267);
                                                    var261 = ((int *) sp)[12];
                                                  }
                                                  else
                                                  {
                                                    var261 = ((int *) sp)[12];
                                                  }
                                                  if (var261 != 0x00000000)
                                                  {
                                                    var262 = ((int *) sp)[13];
                                                    var265 var266 = (*var261) (var262);
                                                  }
                                                  else
                                                  {
                                                  }
                                                }
                                                else
                                                {
                                                  var142 = sp + 0x000002EC;
                                                  var145 = sub_0E610 (var141, "PARENTAL_LEVEL", var142);
                                                  if (var145 == 0x00000000)
                                                  {

                                                  label138:
                                                    var147 = sp + 0x000000A0;
                                                    sceVshCommonUtil_D87E8E2D (var147, "/CONFIG/SYSTEM/LOCK");
                                                    var150 = sp + 0x000002F0;
                                                    var153 = sceVshCommonUtil_7A73DC84 (var147, "parental_level", var150);
                                                    var154 = ((int *) sp)[188];
                                                    var155 = (var153) ? 0x00000000 : var154;
                                                    var156 = ((int *) sp)[187];
                                                    var157 = var155;
                                                    ((int *) sp)[188] = var155;
                                                    if (!(((var156 < 0x0000000C)) != 0x00000000))
                                                    {
                                                      ((int *) sp)[187] = 0x0000000B;
                                                    }
                                                    ((int *) sp)[188] = (!(((var157 < 0x00000000))) ? var157 : 0x00000000);
                                                    if (var4 == 0x00000000)
                                                    {
                                                      var224 = sp + 0x000000C0;
                                                      ((int *) sp)[48] = 0x00000000;
                                                      ((int *) sp)[49] = 0x00000000;
                                                      var227 = sub_0DF88 (var224);
                                                      var228 = ((int *) sp)[187];
                                                      if (var227 < 0)
                                                      {
                                                        vsh_E5463CE5 (0x00000002);
                                                        sub_317D8 (var224);
                                                        sceVshCommonUtil_625A9A5D (var147);
                                                        var241 = ((int *) sp)[20];
                                                        if (var241 != 0x00000000)
                                                        {
                                                          var254 = ((int *) sp)[21];
                                                          var257 var258 = (*var241) (var254);
                                                          var242 = ((int *) sp)[16];
                                                        }
                                                        else
                                                        {
                                                          var242 = ((int *) sp)[16];
                                                        }
                                                        if (var242 != 0x00000000)
                                                        {
                                                          var249 = ((int *) sp)[17];
                                                          var252 var253 = (*var242) (var249);
                                                          var243 = ((int *) sp)[12];
                                                        }
                                                        else
                                                        {
                                                          var243 = ((int *) sp)[12];
                                                        }
                                                        if (var243 != 0x00000000)
                                                        {
                                                          var244 = ((int *) sp)[13];
                                                          var247 var248 = (*var243) (var244);
                                                        }
                                                        else
                                                        {
                                                        }
                                                      }
                                                      else
                                                      {
                                                        var229 = ((int *) sp)[48];
                                                        var230 = sp + 0x00000060;
                                                        sceVshBridge_AA2605A0 (var230, var228, var229);
                                                        sub_317D8 (var224);
                                                        var158 = ((int *) sp)[187];

                                                      label175:
                                                        if (var158 == 0x00000000)
                                                        {
                                                          var160 = ((int *) var3)[0];

                                                        label198:
                                                          var161 = ((int *) sp)[8];
                                                          if (var160 != 0x00000000)
                                                          {

                                                          label222:
                                                            sceVshCommonUtil_625A9A5D (var147);
                                                            var181 = ((int *) sp)[20];
                                                            if (var181 != 0x00000000)
                                                            {
                                                              var194 = ((int *) sp)[21];
                                                              var197 var198 = (*var181) (var194);
                                                              var182 = ((int *) sp)[16];
                                                            }
                                                            else
                                                            {
                                                              var182 = ((int *) sp)[16];
                                                            }
                                                            if (var182 != 0x00000000)
                                                            {
                                                              var189 = ((int *) sp)[17];
                                                              var192 var193 = (*var182) (var189);
                                                              var183 = ((int *) sp)[12];
                                                            }
                                                            else
                                                            {
                                                              var183 = ((int *) sp)[12];
                                                            }
                                                            if (var183 != 0x00000000)
                                                            {
                                                              var184 = ((int *) sp)[13];
                                                              var187 var188 = (*var183) (var184);
                                                            }
                                                            else
                                                            {
                                                            }
                                                          }
                                                          else
                                                          {
                                                            var164 var165 = IoFileMgrForUser_27EB27B8 (var8, var157, var161, 0x00000000, 0x00000000);
                                                            var166 = sp + 0x000000E0;
                                                            if (var165 < 0)
                                                            {

                                                            label240:
                                                              sceVshCommonUtil_625A9A5D (var147);
                                                              var87 = ((int *) sp)[20];
                                                              goto label260;
                                                            }
                                                            else
                                                            {
                                                              var169 = IoFileMgrForUser_6A638D83 (var8, var166, 0x00000200);
                                                              if (var169 != 0x00000200)
                                                              {
                                                                var203 = ((unsigned char *) sp)[224];
                                                                goto label240;
                                                              }
                                                              else
                                                              {
                                                                var170 = ((unsigned char *) sp)[224];
                                                                var171 = ((unsigned char *) sp)[225];
                                                                if ((var170 & 0x000000FF) == 0x0000007E)
                                                                {
                                                                  var172 = var170 & 0x000000FF;
                                                                  if (var171 != 0x00000050)
                                                                  {

                                                                  label214:

                                                                  label215:
                                                                    if (var172 != 0x0000007E)
                                                                    {
                                                                      var200 = ((unsigned char *) sp)[225];
                                                                      goto label240;
                                                                    }
                                                                    else
                                                                    {
                                                                      var173 = ((unsigned char *) sp)[225];
                                                                      if (var173 == 0x00000053)
                                                                      {
                                                                        var177 = ((unsigned char *) sp)[226];
                                                                        if (var177 != 0x00000043)
                                                                        {
                                                                          var199 = ((unsigned char *) sp)[227];
                                                                          goto label240;
                                                                        }
                                                                        else
                                                                        {
                                                                          var178 = ((unsigned char *) sp)[227];
                                                                          if (var178 != 0x00000045)
                                                                            goto label240;
                                                                          goto label222;
                                                                        }
                                                                      }
                                                                      else
                                                                      {
                                                                        var174 = ((unsigned char *) sp)[226];
                                                                        goto label240;
                                                                      }
                                                                    }
                                                                  }
                                                                  else
                                                                  {
                                                                    var201 = ((unsigned char *) sp)[226];
                                                                    if (var201 != 0x00000053)
                                                                    {
                                                                      var172 = var170 & 0x000000FF;
                                                                      goto label214;
                                                                    }
                                                                    else
                                                                    {
                                                                      var172 = var170 & 0x000000FF;
                                                                      var202 = ((unsigned char *) sp)[227];
                                                                      if (var202 != var171)
                                                                      {
                                                                        goto label215;
                                                                      }
                                                                      else
                                                                      {
                                                                        goto label222;
                                                                      }
                                                                    }
                                                                  }
                                                                }
                                                                else
                                                                {
                                                                  var172 = var170 & 0x000000FF;
                                                                  goto label214;
                                                                }
                                                              }
                                                            }
                                                          }
                                                        }
                                                        else
                                                        {
                                                          var159 = ((int *) sp)[188];
                                                          if (var159 == 0x00000000)
                                                          {
                                                            var160 = ((int *) var3)[0];
                                                            goto label198;
                                                          }
                                                          else
                                                          {
                                                            if (((var159 < var158)) != 0x00000000)
                                                            {
                                                              sceVshCommonUtil_625A9A5D (var147);
                                                              var206 = ((int *) sp)[20];
                                                              if (var206 != 0x00000000)
                                                              {
                                                                var219 = ((int *) sp)[21];
                                                                var222 var223 = (*var206) (var219);
                                                                var207 = ((int *) sp)[16];
                                                              }
                                                              else
                                                              {
                                                                var207 = ((int *) sp)[16];
                                                              }
                                                              if (var207 != 0x00000000)
                                                              {
                                                                var214 = ((int *) sp)[17];
                                                                var217 var218 = (*var207) (var214);
                                                                var208 = ((int *) sp)[12];
                                                              }
                                                              else
                                                              {
                                                                var208 = ((int *) sp)[12];
                                                              }
                                                              if (var208 != 0x00000000)
                                                              {
                                                                var209 = ((int *) sp)[13];
                                                                var212 var213 = (*var208) (var209);
                                                              }
                                                              else
                                                              {
                                                              }
                                                            }
                                                            else
                                                            {
                                                              var160 = ((int *) var3)[0];
                                                              goto label198;
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                    else
                                                    {
                                                      var158 = ((int *) sp)[187];
                                                      goto label175;
                                                    }
                                                  }
                                                  else
                                                  {
                                                    if (var145 != 0x80120005)
                                                    {
                                                      var87 = ((int *) sp)[20];
                                                      goto label260;
                                                    }
                                                    else
                                                    {
                                                      var146 = ((int *) sp)[20];
                                                      ((int *) sp)[187] = 0x00000000;
                                                      goto label138;
                                                    }
                                                  }
                                                }
                                              }
                                              else
                                              {
                                                var122 = ((int *) sp)[20];
                                                if (var122 != 0x00000000)
                                                {
                                                  var135 = ((int *) sp)[21];
                                                  var138 var139 = (*var122) (var135);
                                                  var123 = ((int *) sp)[16];
                                                }
                                                else
                                                {
                                                  var123 = ((int *) sp)[16];
                                                }
                                                if (var123 != 0x00000000)
                                                {
                                                  var130 = ((int *) sp)[17];
                                                  var133 var134 = (*var123) (var130);
                                                  var124 = ((int *) sp)[12];
                                                }
                                                else
                                                {
                                                  var124 = ((int *) sp)[12];
                                                }
                                                if (var124 != 0x00000000)
                                                {
                                                  var125 = ((int *) sp)[13];
                                                  var128 var129 = (*var124) (var125);
                                                }
                                                else
                                                {
                                                }
                                              }
                                            }
                                            else
                                            {
                                              var110 = ((int *) sp)[184];
                                              var111 = sp + 0x00000090;
                                              var114 = sub_0E6A0 (var110, "UPDATER_VER", var111, 0x00000008);
                                              var109 = var103;
                                              if (var114 != 0x00000000)
                                                goto label259;
                                              var115 = var111;
                                              var116 = var1;
                                              var117 = var2;
                                              goto label113;
                                            }
                                          }
                                          else
                                          {
                                            if (var106 != 0x80120005)
                                            {
                                              goto label259;
                                            }
                                            else
                                            {
                                              scePaf_98DE3BA6 (var103, "1.00");
                                              goto label107;
                                            }
                                          }
                                        }
                                      }
                                      else
                                      {
                                        var86 = ((char *) sp)[114];
                                        goto label259;
                                      }
                                    }
                                  }
                                  else
                                  {
                                    var84 = (char) var78;
                                    var279 = ((char *) sp)[114];
                                    if (var279 != 0x00000000)
                                    {
                                      goto label92;
                                    }
                                    else
                                    {
                                      var101 = 0x00000002;
                                      goto label99;
                                    }
                                  }
                                }
                                else
                                {
                                  var83 = ((char *) sp)[113];
                                  var84 = (char) var78;
                                  goto label91;
                                }
                              }
                              else
                              {
                                var82 = (char) var78;
                                var281 = ((char *) sp)[114];
                                if (var281 != 0x00000000)
                                {
                                  goto label83;
                                }
                                else
                                {
                                  var101 = 0x00000001;
                                  goto label99;
                                }
                              }
                            }
                            else
                            {
                              var81 = ((char *) sp)[113];
                              var82 = (char) var78;
                              goto label82;
                            }
                          }
                          else
                          {
                            var80 = (char) var78;
                            var283 = ((char *) sp)[114];
                            if (var283 != 0x00000000)
                            {
                              goto label74;
                            }
                            else
                            {
                              ((int *) var3)[0] = 0x00000000;
                              goto label100;
                            }
                          }
                        }
                        else
                        {
                          var79 = ((char *) sp)[113];
                          var80 = (char) var78;
                          goto label73;
                        }
                      }
                    }
                  }
                }
                else
                {
                  var54 = sp + 0x00000060;
                  var57 = sub_0E6A0 (var53, "DISC_ID", var54, 0x0000000D);
                  if (var57 != 0x00000000)
                  {
                    var302 = ((char *) sp)[108];
                    goto label259;
                  }
                  else
                  {
                    var58 = ((char *) sp)[108];
                    var53 = ((int *) sp)[184];
                    if (var58 != 0x00000000)
                      goto label259;
                    goto label37;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[199];
  var18 = ((int *) sp)[198];
  var19 = ((int *) sp)[197];
  var20 = ((int *) sp)[196];
  var21 = ((int *) sp)[195];
  var22 = ((int *) sp)[194];
  var23 = ((int *) sp)[193];
  var24 = ((int *) sp)[192];
  sp = sp + 0x00000320;
  return;
}

/**
 * Subroutine at address 0x0000F43C
 */
void vsh_B08F0F93 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[42] = s2;
  ((int *) sp)[41] = s1;
  ((int *) sp)[40] = s0;
  var1 = arg3;
  ((int *) sp)[44] = ra;
  ((int *) sp)[43] = s3;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if (((arg2 < 0x00001401)) == 0x00000000)
  {

  label116:
    var37 = sp;
    sub_317D8 (var37);
  }
  else
  {
    var2 = sp + 0x00000080;
    var5 = sceVshCommonUtil_80311468 (arg1, arg2, var2);
    var6 = ((int *) sp)[32];
    if (var5 != 0x00000000)
      goto label116;
    var7 = sp + 0x00000030;
    ((int *) sp)[8] = 0x0000DF18;
    ((int *) sp)[9] = var6;
    ((int *) sp)[12] = 0x00000000;
    ((int *) sp)[13] = 0x00000000;
    ((int *) sp)[14] = 0x00000000;
    ((char *) sp)[60] = 0x00000000;
    var10 = sub_0E6A0 (var6, "DISC_ID", var7, 0x0000000D);
    if (var10 != 0x00000000)
    {
      var152 = ((char *) sp)[60];

    label111:
      var36 = ((int *) sp)[8];

    label112:
      if (var36 != 0x00000000)
      {
        var44 = ((int *) sp)[9];
        var47 var48 = (*var36) (var44);
      }
      goto label116;
    }
    else
    {
      var11 = ((char *) sp)[60];
      var12 = ((int *) sp)[32];
      if (var11 != 0x00000000)
        goto label111;
      var13 = sp + 0x00000084;
      var16 = sub_0E610 (var12, "REGION", var13);
      if (var16 != 0x00000000)
      {
        var36 = ((int *) sp)[8];
        goto label112;
      }
      else
      {
        var17 = ((int *) sp)[8];
        var18 = ((int *) sp)[33];
        var21 = vsh_C04BE20F (var18);
        var22 = ((int *) sp)[32];
        if (var21 <= 0)
        {
          var143 = ((int *) sp)[8];
          if (var143 != 0x00000000)
          {
            var147 = ((int *) sp)[9];
            var150 var151 = (*var143) (var147);
          }
          var144 = sp;
          sub_317D8 (var144);
        }
        else
        {
          var23 = sp + 0x00000088;
          var26 = sub_0E610 (var22, "BOOTABLE", var23);
          var27 = ((int *) sp)[32];
          if (var26 != 0x00000000)
            goto label111;
          var28 = sp + 0x00000040;
          var31 = sub_0E6A0 (var27, "CATEGORY", var28, 0x00000004);
          var32 = ((char *) sp)[64];
          if (var31 != 0x00000000)
            goto label111;
          var33 = ((char *) var1)[0];
          if (var32 != var33)
          {
            var142 = ((char *) sp)[65];
            goto label111;
          }
          else
          {
            var34 = ((char *) sp)[65];
            var35 = ((char *) var1)[1];
            if (!(var34 == var35))
              goto label111;
            var49 = ((char *) var1)[2];
            var50 = ((char *) sp)[66];
            if (var50 != var49)
            {
              var36 = ((int *) sp)[8];
              goto label112;
            }
            else
            {
              var51 = ((int *) sp)[8];
              var52 = ((int *) sp)[32];
              var53 = sp + 0x00000050;
              var56 = sub_0E6A0 (var52, "PSP_SYSTEM_VER", var53, 0x00000008);
              if (var56 == 0x00000000)
              {

              label43:
                var61 = vsh_D45A92CB (var53, 0x00000000, arg4, arg5);
                if (var61 == 0x00000000)
                {
                  var71 = ((int *) sp)[34];
                  var72 = ((int *) sp)[32];
                  if (var71 != 0x00000001)
                  {
                    var133 = ((int *) sp)[8];
                    if (var133 != 0x00000000)
                    {
                      var137 = ((int *) sp)[9];
                      var140 var141 = (*var133) (var137);
                    }
                    var134 = sp;
                    sub_317D8 (var134);
                  }
                  else
                  {
                    var73 = sp + 0x0000008C;
                    var76 = sub_0E610 (var72, "PARENTAL_LEVEL", var73);
                    if (var76 == 0x00000000)
                    {

                    label60:
                      var78 = sp + 0x00000060;
                      sceVshCommonUtil_D87E8E2D (var78, "/CONFIG/SYSTEM/LOCK");
                      var81 = sp + 0x00000090;
                      var84 = sceVshCommonUtil_7A73DC84 (var78, "parental_level", var81);
                      var85 = ((int *) sp)[36];
                      var86 = (var84) ? 0x00000000 : var85;
                      var87 = ((int *) sp)[35];
                      ((int *) sp)[36] = var86;
                      if (!(((var87 < 0x0000000C)) != 0x00000000))
                      {
                        ((int *) sp)[35] = 0x0000000B;
                      }
                      var88 = sp;
                      ((int *) sp)[36] = ((((var86 < 0x00000000))) ? 0x00000000 : var86);
                      var91 = sub_0DF88 (var88);
                      var92 = ((int *) sp)[0];
                      if (var91 < 0)
                      {
                        vsh_E5463CE5 (0x00000002);
                        sceVshCommonUtil_625A9A5D (var78);
                        var124 = ((int *) sp)[8];
                        if (var124 != 0x00000000)
                        {
                          var128 = ((int *) sp)[9];
                          var131 var132 = (*var124) (var128);
                        }
                        var125 = sp;
                        sub_317D8 (var125);
                      }
                      else
                      {
                        var93 = ((int *) sp)[35];
                        sceVshBridge_AA2605A0 (var7, var93, var92);
                        var96 = ((int *) sp)[35];
                        var97 = ((int *) sp)[36];
                        if (var96 == 0x00000000)
                        {

                        label95:
                          sceVshCommonUtil_625A9A5D (var78);
                          var100 = ((int *) sp)[8];
                          if (var100 != 0x00000000)
                          {
                            var104 = ((int *) sp)[9];
                            var107 var108 = (*var100) (var104);
                          }
                          var101 = sp;
                          sub_317D8 (var101);
                        }
                        else
                        {
                          if (var97 == 0x00000000)
                          {
                            goto label95;
                          }
                          else
                          {
                            if (!(((var97 < var96)) != 0x00000000))
                              goto label95;
                            sceVshCommonUtil_625A9A5D (var78);
                            var111 = ((int *) sp)[8];
                            if (var111 != 0x00000000)
                            {
                              var115 = ((int *) sp)[9];
                              var118 var119 = (*var111) (var115);
                            }
                            var112 = sp;
                            sub_317D8 (var112);
                          }
                        }
                      }
                    }
                    else
                    {
                      if (var76 != 0x80120005)
                      {
                        var36 = ((int *) sp)[8];
                        goto label112;
                      }
                      else
                      {
                        var77 = ((int *) sp)[8];
                        ((int *) sp)[35] = 0x00000000;
                        goto label60;
                      }
                    }
                  }
                }
                else
                {
                  var62 = ((int *) sp)[8];
                  if (var62 != 0x00000000)
                  {
                    var66 = ((int *) sp)[9];
                    var69 var70 = (*var62) (var66);
                  }
                  var63 = sp;
                  sub_317D8 (var63);
                }
              }
              else
              {
                if (var56 != 0x80120005)
                  goto label111;
                scePaf_98DE3BA6 (var53, "1.00");
                goto label43;
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[44];
  var40 = ((int *) sp)[43];
  var41 = ((int *) sp)[42];
  var42 = ((int *) sp)[41];
  var43 = ((int *) sp)[40];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x0000F7E4
 */
void vsh_2817BD81 ()
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[36] = s0;
  ((int *) sp)[39] = ra;
  ((int *) sp)[38] = s2;
  ((int *) sp)[37] = s1;
  var3 = IoFileMgrForUser_109F50BC (arg1, 0x00000001, 0x00000000);
  var4 = var3;
  if (!(var4 < 0))
  {
    var5 = sp;
    ((int *) sp)[12] = 0x0000DEE0;
    ((int *) sp)[13] = var4;
    var8 = IoFileMgrForUser_6A638D83 (var4, var5, 0x00000028);
    var9 = var8;
    if (var9 != 0x00000028)
    {
      var116 = ((char *) sp)[0];

    label90:
      var13 = ((int *) sp)[12];

    label91:
      if (var13 != 0x00000000)
      {
        var17 = ((int *) sp)[13];
        var20 var21 = (*var13) (var17, var9);
      }
      else
      {
      }
    }
    else
    {
      var10 = ((char *) sp)[0];
      if (var10 != 0x00000000)
      {
        goto label90;
      }
      else
      {
        var11 = ((char *) sp)[1];
        var12 = ((char *) sp)[2];
        if (!(var11 == 0x00000050))
          goto label90;
        if (var12 != 0x00000042)
        {
          var13 = ((int *) sp)[12];
          goto label91;
        }
        else
        {
          var22 = ((int *) sp)[12];
          var23 = ((char *) sp)[3];
          if (var23 != var11)
          {
            var13 = ((int *) sp)[12];
            goto label91;
          }
          else
          {
            var24 = ((int *) sp)[12];
            var25 = ((int *) sp)[3];
            var26 = ((int *) sp)[2];
            var27 = var25 - var26;
            if (((var26 < var25)) == 0x00000000)
              goto label90;
            if (((var27 < 0x00001401)) == 0x00000000)
            {
              var13 = ((int *) sp)[12];
              goto label91;
            }
            else
            {
              var28 = ((int *) sp)[12];
              var31 = scePaf_6CEA048C (var27);
              var32 = var31;
              if (var31 == 0x00000000)
                goto label90;
              var33 = ((int *) sp)[2];
              ((int *) sp)[16] = 0x0000DF50;
              ((int *) sp)[17] = var32;
              var36 var37 = IoFileMgrForUser_27EB27B8 (var4);
              if (var37 < 0)
              {

              label40:
                var105 = ((int *) sp)[16];

              label41:
                if (var105 == 0x00000000)
                {
                  var13 = ((int *) sp)[12];
                }
                else
                {
                  var106 = ((int *) sp)[17];
                  var109 var110 = (*var105) (var106, var50);
                  var13 = ((int *) sp)[12];
                }
                goto label91;
              }
              else
              {
                var40 = IoFileMgrForUser_6A638D83 (var4, var32, var27);
                if (var40 != var27)
                  goto label40;
                var41 = sp + 0x00000080;
                var44 = sceVshCommonUtil_80311468 (var32, var40, var41);
                var45 = ((int *) sp)[32];
                if (var44 != 0x00000000)
                  goto label40;
                var46 = sp + 0x00000084;
                ((int *) sp)[20] = 0x0000DF18;
                ((int *) sp)[21] = var45;
                var49 = sub_0E610 (var45, "PARENTAL_LEVEL", var46);
                var50 = var49;
                if (var49 == 0x00000000)
                {

                label47:
                  var52 = sp + 0x00000060;
                  sceVshCommonUtil_D87E8E2D (var52, "/CONFIG/SYSTEM/LOCK");
                  var55 = sp + 0x00000088;
                  var58 = sceVshCommonUtil_7A73DC84 (var52, "parental_level", var55);
                  var59 = ((int *) sp)[33];
                  var60 = ((int *) sp)[34];
                  var61 = (var58) ? 0x00000000 : var60;
                  var62 = var61;
                  ((int *) sp)[34] = var61;
                  if (!(((var59 < 0x0000000C)) != 0x00000000))
                  {
                    var59 = 0x0000000B;
                    ((int *) sp)[33] = 0x0000000B;
                  }
                  var63 = (((var62 < 0x00000000))) ? 0x00000000 : var62;
                  ((int *) sp)[34] = var63;
                  if (var59 == 0x00000000)
                  {

                  label73:
                    sceVshCommonUtil_625A9A5D (var52);
                    var66 = ((int *) sp)[20];
                    if (var66 != 0x00000000)
                    {
                      var79 = ((int *) sp)[21];
                      var82 var83 = (*var66) (var79);
                      var67 = ((int *) sp)[16];
                    }
                    else
                    {
                      var67 = ((int *) sp)[16];
                    }
                    if (var67 != 0x00000000)
                    {
                      var74 = ((int *) sp)[17];
                      var77 var78 = (*var67) (var74);
                      var68 = ((int *) sp)[12];
                    }
                    else
                    {
                      var68 = ((int *) sp)[12];
                    }
                    if (var68 != 0x00000000)
                    {
                      var69 = ((int *) sp)[13];
                      var72 var73 = (*var68) (var69);
                    }
                    else
                    {
                    }
                  }
                  else
                  {
                    if (var63 == 0x00000000)
                      goto label73;
                    if (!(((var63 < var59)) != 0x00000000))
                      goto label73;
                    sceVshCommonUtil_625A9A5D (var52);
                    var86 = ((int *) sp)[20];
                    if (var86 != 0x00000000)
                    {
                      var99 = ((int *) sp)[21];
                      var102 var103 = (*var86) (var99);
                      var87 = ((int *) sp)[16];
                    }
                    else
                    {
                      var87 = ((int *) sp)[16];
                    }
                    if (var87 != 0x00000000)
                    {
                      var94 = ((int *) sp)[17];
                      var97 var98 = (*var87) (var94);
                      var88 = ((int *) sp)[12];
                    }
                    else
                    {
                      var88 = ((int *) sp)[12];
                    }
                    if (var88 != 0x00000000)
                    {
                      var89 = ((int *) sp)[13];
                      var92 var93 = (*var88) (var89);
                    }
                    else
                    {
                    }
                  }
                }
                else
                {
                  if (var50 != 0x80120005)
                  {
                    var104 = ((int *) sp)[20];
                    if (!(var104 != 0x00000000))
                      goto label40;
                    var111 = ((int *) sp)[21];
                    var114 var115 = (*var104) (var111, var50);
                    var105 = ((int *) sp)[16];
                    goto label41;
                  }
                  else
                  {
                    var51 = ((int *) sp)[20];
                    ((int *) sp)[33] = 0x00000000;
                    goto label47;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[39];
  var14 = ((int *) sp)[38];
  var15 = ((int *) sp)[37];
  var16 = ((int *) sp)[36];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0000FAD4
 */
int vsh_72193F87 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = fp;
  var1 = sp + 0x00000060;
  ((int *) sp)[67] = s3;
  ((int *) sp)[64] = s0;
  ((int *) sp)[68] = s4;
  var2 = arg1;
  ((int *) sp)[73] = ra;
  ((int *) sp)[71] = s7;
  ((int *) sp)[70] = s6;
  ((int *) sp)[69] = s5;
  ((int *) sp)[66] = s2;
  ((int *) sp)[65] = s1;
  ((int *) sp)[24] = 0x00000000;
  ((int *) sp)[60] = 0x00000000;
  ((int *) sp)[25] = 0x00000000;
  sub_318F0 (var1, "flash0:/vsh/etc/");
  var7 = scePaf_967A56EF (0x00038B00);
  var10 = sub_33528 (var1, 0x00038B00, var7);
  var13 = sceVshBridge_2EB0812A ();
  var14 = var13;
  if (var14 == 0x00000001)
  {
    var150 = scePaf_967A56EF (0x00038B08);
    var153 = sub_33528 (var1, 0x00038B08, var150);
    var33 = 0x00038B28;

  label31:
    var36 = scePaf_967A56EF (var33);
    var39 = sub_33528 (var1, var33, var36);
    var42 = scePaf_967A56EF (0x00038B10);
    var45 = sub_33528 (var1, 0x00038B10, var42);
    var46 = ((int *) sp)[24];
    var47 = sp;
    var50 = IoFileMgrForUser_ACE946E8 (var46, var47);
    var51 = var50;
    if (var50 < 0)
    {

    label62:
      sub_317D8 (var1);
      var17 = var51;
    }
    else
    {
      var52 = ((int *) sp)[2];
      var53 = ((int *) sp)[3];
      var54 = ((int *) sp)[2];
      if ((var52 | var53) == 0x00000000)
      {

      label111:
        sub_317D8 (var1);
        var17 = 0xFFFFFFFF;
      }
      else
      {
        var57 = scePaf_31AC0624 (0x00000040, var54);
        var58 = var57;
        if (var57 == 0x00000000)
          goto label111;
        var59 = ((int *) sp)[2];
        var60 = ((int *) sp)[24];
        var61 = sp + 0x000000F0;
        ((int *) sp)[32] = 0x0000DF6C;
        ((int *) sp)[33] = var58;
        var64 = vsh_6D850670 (var60, var57, var59, var61);
        var51 = var64;
        if (var64 < 0)
        {
          if (!(var2 == 0x00000000))
          {
            var126 = var2;
            var127 = 0x00000000;
            while (1) {
              sub_318F0 (var126, 0x00038B20);
              sub_318F0 ((var126 + 0x0000000C), 0x00038B20);
              var127 = var127 + 0x00000001;
              sub_318F0 ((var126 + 0x00000018), 0x00038B20);
              var126 = var126 + 0x00000024;
              if (((var127 < 0x00000005)) != 0x00000000)
                continue;
              break;
            }
          }
          var134 = ((int *) sp)[32];
          if (var134 != 0x00000000)
          {
            var137 = ((int *) sp)[33];
            var140 var141 = (*var134) (var137);
          }
          goto label62;
        }
        else
        {
          var65 = sp + 0x000000B0;
          var66 = sp + 0x00000090;
          var67 = sp + 0x000000A0;
          sub_3349C (var66);
          var70 = sp + 0x000000C0;
          ((int *) sp)[44] = 0x00000000;
          var71 = 0x00000000;
          ((int *) sp)[61] = 0x00000005;
          ((int *) sp)[45] = 0x00000000;
          sub_318F0 (var65, var58);
          ((int *) sp)[48] = 0x00000000;
          ((int *) sp)[49] = 0x00000000;
          sub_318F0 (var70, 0x00038B18);
          var76 = sp + 0x00000090;
          scePaf_51AA42D2 (var76, var65, var70, 0x00000006);
          sub_317D8 (var70);
          sub_317D8 (var65);
          var83 = ((int *) sp)[37];
          var84 = ((int *) sp)[61];
          var85 = (((var83 < 0x00000005))) ? var83 : var84;
          ((int *) sp)[61] = var85;
          if (!(var85 == 0x00000000))
          {
            var86 = var2;
            var87 = var2 + 0x00000018;
            var88 = var2 + 0x0000000C;
            var89 = sp + 0x000000E0;
            var90 = 0x00000000;
            var91 = var89;
            while (1) {
              var92 = sp + 0x000000A0;
              sub_3349C (var91);
              var95 = ((int *) sp)[36];
              ((int *) sp)[48] = 0x00000000;
              var71 = var71 + 0x00000001;
              var90 = var90 + 0x0000000C;
              ((int *) sp)[49] = 0x00000000;
              sub_318F0 (var70, 0x00038B1C);
              scePaf_51AA42D2 (var89, (var95 + var90), var70, 0x00000003);
              sub_317D8 (var70);
              var102 = ((int *) sp)[57];
              var86 = var86 + 0x00000024;
              if (var102 != 0x00000000)
              {
                var123 = ((int *) sp)[56];
                sub_31940 (var86, var123);
                var102 = ((int *) sp)[57];
              }
              var88 = var88 + 0x00000024;
              if (((var102 < 0x00000002)) == 0x00000000)
              {
                var120 = ((int *) sp)[56];
                sub_31940 (var88, (var120 + 0x0000000C));
                var102 = ((int *) sp)[57];
              }
              var87 = var87 + 0x00000024;
              if (((var102 < 0x00000003)) == 0x00000000)
              {
                var117 = ((int *) sp)[56];
                sub_31940 (var87, (var117 + 0x00000018));
              }
              sub_334AC (var89);
              var105 = ((int *) sp)[61];
              var91 = var89;
              if (((var71 < var105)) != 0x00000000)
                continue;
              break;
            }
          }
          var106 = sp + 0x00000090;
          sub_334AC (var106);
          var109 = ((int *) sp)[32];
          if (var109 != 0x00000000)
          {
            var112 = ((int *) sp)[33];
            var115 var116 = (*var109) (var112);
          }
          sub_317D8 (var1);
          var17 = 0x00000000;
        }
      }
    }
  }
  else
  {
    if (((var14 < 0x00000002)) != 0x00000000)
    {
      if (var14 != 0x00000000)
        goto label111;
      var144 = scePaf_967A56EF (0x00038B08);
      var147 = sub_33528 (var1, 0x00038B08, var144);
      var33 = 0x00038B24;
      goto label31;
    }
    else
    {
      if (!(var14 == 0x00000002))
        goto label111;
      var29 = scePaf_967A56EF (0x00038B08);
      var32 = sub_33528 (var1, 0x00038B08, var29);
      var33 = 0x00038B0C;
      goto label31;
    }
  }
  ra = ((int *) sp)[73];
  var18 = ((int *) sp)[72];
  var19 = ((int *) sp)[71];
  var20 = ((int *) sp)[70];
  var21 = ((int *) sp)[69];
  var22 = ((int *) sp)[68];
  var23 = ((int *) sp)[67];
  var24 = ((int *) sp)[66];
  var25 = ((int *) sp)[65];
  var26 = ((int *) sp)[64];
  sp = sp + 0x00000130;
  return var17;
}

/**
 * Subroutine at address 0x0000FEEC
 */
void sub_0FEEC ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  var2 = sp + 0x00000004;
  var3 = sp + 0x00000008;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  var6 = sceVshBridge_1FD498B6 (var1, var2, var3);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var11 = sceVshBridge_639C3CB3 (0x00002000);
    var12 = 0x00000001;
    if (!(var11 == 0x00000000))
    {
      var12 = (0x00000000 < (var11 ^ 0x00000001));
    }
    var13 = ((int *) sp)[0];
    if (var13 == 0x000001D2)
    {

    label58:
      *((char *) 0x00047ACC) = 0x00000001;
      var22 = scePaf_2338483F ();

    label61:
      scePaf_636A02EC (var22, 0x00000002);
    }
    else
    {
      if (((var13 < 0x000001D3)) == 0x00000000)
      {
        if (var13 == 0x000004D1)
        {

        label43:

        label44:
          *((char *) 0x00047ACC) = 0x00000001;
          var27 = scePaf_2338483F ();
          var30 = scePaf_553637C4 (var27);
          if (var30 == 0x00000001)
          {
            var36 = scePaf_2338483F ();
          }
          else
          {
            var33 = scePaf_2338483F ();
          }
          goto label61;
        }
        else
        {
          if (((var13 < 0x000004D2)) == 0x00000000)
          {
            if (var13 == 0x000006D1)
            {
              goto label43;
            }
            else
            {
              if (((var13 < 0x000006D2)) == 0x00000000)
              {
                var37 = 0x000007D1;
              }
              else
              {
                var37 = 0x000005D1;
              }

            label39:
              if (!(var13 != var37))
              {
                goto label44;
              }
            }
          }
          else
          {
            if (var13 == 0x000002E2)
            {
              goto label58;
            }
            else
            {
              if (((var13 < 0x000002E3)) == 0x00000000)
              {
                var19 = 0x000003D2;
              }
              else
              {
                var19 = 0x000002D2;
              }

            label57:
              if (!(var13 != var19))
                goto label58;
            }
          }
        }
      }
      else
      {
        if (var13 == 0x000000E0)
        {
          *((char *) 0x00047ACC) = 0x00000000;
          var40 = scePaf_2338483F ();
          var12 = 0x00000001;
          goto label61;
        }
        else
        {
          if (((var13 < 0x000000E1)) == 0x00000000)
          {
            if (var13 == 0x000000E2)
            {
              goto label58;
            }
            else
            {
              if (((var13 < 0x000000E2)) != 0x00000000)
              {
                goto label44;
              }
              else
              {
                var37 = 0x000001D1;
                goto label39;
              }
            }
          }
          else
          {
            if (var13 == 0x000000D1)
            {
              goto label43;
            }
            else
            {
              if (((var13 < 0x000000D2)) == 0x00000000)
              {
                var19 = 0x000000D2;
                goto label57;
              }
              else
              {
                if (var13 == 0x00000000)
                {
                  var12 = 0x00000001;
                  *((char *) 0x00047ACC) = 0x00000000;
                }
              }
            }
          }
        }
      }
    }
    var16 = scePaf_2338483F ();
    scePaf_4A4A8444 (var16, var12);
    var7 = 0x00000000;
  }
  ra = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000100AC
 */
void vsh_DADF3D12 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((unsigned char *) 0x00047ACC);
  ((int *) sp)[3] = s3;
  var2 = 0x00000001;
  ((int *) sp)[2] = s2;
  var3 = 0x00000000;
  ((int *) sp)[4] = ra;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000000)
  {

  label25:
    var37 = scePaf_2338483F ();
    scePaf_636A02EC (var37, var3);
    var42 = scePaf_2338483F ();
  }
  else
  {
    var6 = scePaf_2338483F ();
    var9 = scePaf_553637C4 (var6);
    var10 = var9;
    var13 = sceVshBridge_639C3CB3 (0x00008000);
    if (var13 == 0x00000000)
    {

    label32:
      *((char *) 0x00047ACC) = 0x00000000;
      var20 = scePaf_2338483F ();
      scePaf_636A02EC (var20, 0x00000000);
      var25 = scePaf_2338483F ();
    }
    else
    {
      var16 = sceVshBridge_639C3CB3 (0x00004000);
      var17 = var16;
      if (var10 == 0x00000001)
      {
        var3 = 0x00000003;

      label19:
        var34 = sceVshBridge_639C3CB3 (0x00002000);
        if (var34 == 0x00000000)
        {
          var2 = 0x00000001;
        }
        else
        {
          if (var34 == 0x00000001)
          {
            var2 = 0x00000000;
          }
        }
        goto label25;
      }
      else
      {
        if (!(var10 == 0x00000002))
          goto label32;
        if (var17 == 0x00000000)
        {
          var3 = 0x00000002;
        }
        else
        {
          if (var17 == 0x00000001)
          {
            var3 = 0x00000001;
          }
        }
        goto label19;
      }
    }
  }
  scePaf_4A4A8444 (var25, 0x00000001);
  ra = ((int *) sp)[4];
  var28 = ((int *) sp)[3];
  var29 = ((int *) sp)[2];
  var30 = ((int *) sp)[1];
  var31 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000101C8
 */
void vsh_2FCC4BC4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((char *) 0x00047ACC) = arg1;
  vsh_DADF3D12 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000101E8
 */
int vsh_1B1CE2CF ()
{
  var1 = *((unsigned char *) 0x00047ACC);
  return var1;
}

/**
 * Subroutine at address 0x000101F4
 */
void sub_101F4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  *((int *) 0x0004567C) = ((((0x00045670 >> 24) & 0x0000000F) << 0x00000010) | 0x10000000);
  *((int *) 0x00045680) = (((0x00045670 & 0x00FFFFFF) | (0x00000000 & 0x000000FF)) | 0x0A000000);
  ((int *) sp)[1] = ra;
  *((int *) 0x00045670) = (((0x0004566C & 0x00FFFFFF) | (0x00000000 & 0x000000FF)) | 0x0A000000);
  UtilsForUser_79D1C3FA ();
  var5 = sceGe_user_AB49E76A (0x00045678, 0x00000000, 0xFFFFFFFF, 0x00000000);
  sceGe_user_03444EB4 (var5, 0x00000000);
  sceGe_user_B287BD61 (0x00000000);
  ra = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001028C
 */
void sub_1028C (int arg1)
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[54] = ra;
  ((int *) sp)[53] = s1;
  ((int *) sp)[52] = s0;
  var3 = sub_0D464 (0x00000001);
  var4 = var3;
  var5 = sp;
  sceCtrl_3A622550 (var5, 0x00000001);
  var8 = ((unsigned char *) var4)[3];
  if (!(var8 != 0x00000000))
  {
    var9 = ((unsigned char *) var4)[2];
    var10 = ((int *) sp)[1];
    if (var9 != 0x00000000)
    {

    label9:
      var165 = vsh_C3580990 (0x0000003F);
      if (var165 != 0x00000000)
      {
        var172 = vsh_C3580990 (0x00000010);
      }
      else
      {
      }
      ((char *) var4)[3] = 0x00000001;
      ((char *) var4)[2] = 0x00000000;
      vsh_6216FAD3 ();
      sub_0BD64 ();
    }
    else
    {
      if (var10 == 0x00009009)
        goto label9;
    }
  }
  sub_0D1A4 ();
  sub_0D93C ();
  sub_2EE94 ();
  sceVshBridge_C949966C (0x00000028);
  var21 = vsh_E261B0EE ();
  var24 = sceVshBridge_2EB0812A ();
  var27 = sub_109D0 (var21, var24, (arg1 & 0x000000FF));
  *((int *) 0x00047AE4) = var27;
  if (var27 == 0xFFFFFFFF)
  {
    vsh_E5463CE5 (0x00000001);
  }
  var30 = vsh_E261B0EE ();
  var33 = sceVshBridge_2EB0812A ();
  var36 = sub_10718 (var30, var33);
  if (var36 != 0x00000000)
  {
    vsh_E5463CE5 (0x00000001);
    var37 = sp + 0x00000010;
  }
  else
  {
    var37 = sp + 0x00000010;
  }
  scePaf_8B426887 (var37);
  var40 = sp + 0x00000054;
  var41 = sp + 0x00000050;
  ((int *) sp)[6] = 0x00100000;
  ((int *) sp)[4] = 0x00000002;
  sub_10AA8 (var41, var40);
  var46 = scePaf_48BB05D5 (0x000000A4);
  scePaf_94C0001B (var46, var37);
  *((int *) 0x00047AD0) = var46;
  var51 = scePaf_6492F0ED ();
  if (var51 == 0x00000000)
  {
    vsh_E5463CE5 (0x00000001);
  }
  else
  {
  }
  scePaf_42C3EC10 (0x00034F14);
  scePaf_2D1BB6BD (0x000111A0);
  scePaf_D0FA27ED (0x000111DC);
  scePaf_A223BF81 (0x00011168);
  scePaf_889CD9E3 (0x00011184);
  var62 = sp + 0x00000080;
  sceVshCommonUtil_D87E8E2D (var62, "/CONFIG/SYSTEM/XMB");
  var65 = sp + 0x000000B0;
  var68 = sceVshCommonUtil_7A73DC84 (var62, "button_assign", var65);
  var69 = ((int *) sp)[44];
  if (var68 != 0x00000000)
  {

  label81:
  }
  else
  {
    if (!(var69 == 0x00000000))
      goto label81;
  }
  scePaf_36528408 (0x00000001);
  sceVshCommonUtil_625A9A5D (var62);
  sceVshCommonUtil_D87E8E2D (var62, "/CONFIG/SYSTEM/SOUND");
  var76 = sp + 0x000000B4;
  var79 = sceVshCommonUtil_7A73DC84 (var62, "dynamic_normalizer", var76);
  if (var79 == 0x00000000)
  {
    var154 = ((int *) sp)[45];
    sceVaudio_CBD4AC51 (var154);
  }
  sceVshCommonUtil_625A9A5D (var62);
  var84 = sceVshBridge_2EB0812A ();
  if (var84 == 0x00000001)
  {

  label102:
    sceVshCommonUtil_D87E8E2D (var62, "/CONFIG/SYSTEM");
    var145 = sp + 0x000000B8;
    var148 = sceVshCommonUtil_7A73DC84 (var62, "umd_cache", var145);
    if (var148 == 0x00000000)
    {
      var151 = ((int *) sp)[46];
      sceVshBridge_5701773B (var151);
    }
    sceVshCommonUtil_625A9A5D (var62);
  }
  else
  {
    var87 = sceVshBridge_2EB0812A ();
    if (var87 == 0x00000002)
      goto label102;
  }
  var90 = sceVshBridge_2EB0812A ();
  if (var90 != 0x00000000)
  {
    var130 = sceVshBridge_2EB0812A ();
    if (!(var130 == 0x00000001))
    {
      sceVshCommonUtil_D87E8E2D (var62, "/CONFIG/DISPLAY");
      var133 = sp + 0x000000BC;
      var136 = sceVshCommonUtil_7A73DC84 (var62, "color_space_mode", var133);
      if (var136 != 0x00000000)
      {
        var142 = ((int *) sp)[47];
      }
      else
      {
        var137 = ((int *) sp)[47];
        if (var137 == 0x00000000)
        {

        label127:
          sceVshBridge_B58B4CAE (0x00000001);
        }
        else
        {
          if (var137 == 0x00000001)
            goto label127;
        }
      }
      sceVshCommonUtil_625A9A5D (var62);
    }
  }
  var93 = sceVshBridge_2EB0812A ();
  if (var93 != 0x00000000)
  {
    var115 = sceVshBridge_2EB0812A ();
    if (var115 == 0x00000001)
    {

    label154:
    }
    else
    {
      sceVshCommonUtil_D87E8E2D (var62, "/CONFIG/SYSTEM/POWER_SAVING");
      var118 = sp + 0x000000C0;
      var121 = sceVshCommonUtil_7A73DC84 (var62, "active_backlight_mode", var118);
      if (var121 != 0x00000000)
      {
        var127 = ((int *) sp)[48];
      }
      else
      {
        var122 = ((int *) sp)[48];
        if (var122 == 0x00000000)
        {

        label148:
          sceVshBridge_8D3EB758 (0x00000001);
        }
        else
        {
          if (var122 == 0x00000001)
          {
            goto label148;
          }
        }
      }
      sceVshCommonUtil_625A9A5D (var62);
    }
  }
  else
  goto label154;
  sceVshCommonUtil_3DCE48A0 (0x00000000, 0x00000000);
  var96 = sp + 0x000000A0;
  scePaf_BC8DC92B (var96);
  var99 = ((unsigned short *) sp)[83];
  var100 = ((unsigned short *) sp)[84];
  var101 = ((unsigned short *) sp)[85];
  scePaf_D095DD26 ((((var99 << 0x00000010) | (var100 << 0x00000008)) | var101));
  var106 = sceVshBridge_A71BF332 ();
  if (!(var106 <= 0))
  {
    sub_0FEEC ();
  }
  sub_09F90 ();
  ra = ((int *) sp)[54];
  var111 = ((int *) sp)[53];
  var112 = ((int *) sp)[52];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x000106AC
 */
void sub_106AC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047AD0);
  if (var1 != 0x00000000)
  {
    scePaf_24E00D5E (var1);
    scePaf_4508F2FA (var1);
  }
  sub_10B7C ();
  sceVshCommonUtil_F99D2D50 ();
  sub_2EF0C ();
  sub_0D990 ();
  sub_0D1FC ();
  ra = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010718
 */
int sub_10718 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[43] = s3;
  var1 = sp + 0x00000060;
  ((int *) sp)[42] = s2;
  ((int *) sp)[41] = s1;
  ((int *) sp)[46] = ra;
  ((int *) sp)[44] = s4;
  ((int *) sp)[45] = s5;
  ((int *) sp)[40] = s0;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000001);
  var6 = IoFileMgrForUser_06A70004 ("flash1:/registry", 0x00000FFF);
  var7 = sp;
  var10 = IoFileMgrForUser_ACE946E8 ("flash1:/registry/init.dat", var7);
  if (var10 == 0x00000000)
  {
    var95 = vsh_C3580990 (0x00000001);
    var63 = var95;
    if (var95 != 0x00000000)
    {

    label81:
      sceVshCommonUtil_B5C86FBB (var1);
      var15 = var63;
    }
    else
    {
      *((int *) 0x00047AE4) = 0x00000001;

    label13:
      var11 = *((int *) 0x00047AE4);
      var12 = sp + 0x00000070;
      if (var11 == 0x00000001)
      {
        scePaf_6439FDBC (var12, 0x00000000, 0x00000018);
        var24 = sp + 0x00000092;
        ((int *) sp)[28] = arg1;
        ((int *) sp)[29] = arg2;
        var27 = sceVshBridge_4DB43867 (0x00000046, 0x00000000, var24, 0x00000001);
        if (var27 == 0x00000000)
        {
          var92 = ((unsigned char *) sp)[146];
          ((int *) sp)[30] = var92;
        }
        else
        {
          var28 = ((unsigned char *) sp)[146];
          ((int *) sp)[30] = 0x00000000;
        }
        var29 = sp + 0x00000092;
        var32 = sceVshBridge_4DB43867 (0x00000047, 0x00000000, var29, 0x00000001);
        if (var32 == 0x00000000)
        {
          var91 = ((unsigned char *) sp)[146];
          ((int *) sp)[31] = var91;
        }
        else
        {
          var33 = ((unsigned char *) sp)[146];
          ((int *) sp)[31] = 0x00000000;
        }
        var34 = sp + 0x00000092;
        var37 = sceVshBridge_4DB43867 (0x00000054, 0x00000000, var34, 0x00000001);
        if (var37 == 0x00000000)
        {
          var90 = ((unsigned char *) sp)[146];
          ((int *) sp)[32] = var90;
        }
        else
        {
          var38 = ((unsigned char *) sp)[146];
          ((int *) sp)[32] = 0x00000000;
        }
        var39 = sp + 0x00000092;
        var42 = sceVshBridge_4DB43867 (0x00000054, 0x00000001, var39, 0x00000001);
        if (var42 == 0x00000000)
        {
          var89 = ((unsigned char *) sp)[146];
          ((int *) sp)[33] = var89;
        }
        else
        {
          var43 = ((unsigned char *) sp)[146];
          ((int *) sp)[33] = 0x00000000;
        }
        var46 = sceVshBridge_2EB0812A ();
        var47 = ((int *) sp)[32];
        if (var46 == 0x00000001)
        {

        label47:
          var81 = ((int *) sp)[30];
          if (var47 != 0x00000002)
          {

          label55:
          }
          else
          {
            var82 = sp + 0x00000090;
            ((short *) sp)[72] = 0x00000000;
            var85 = sceVshBridge_4DB43867 (0x00000054, 0x00000002, var82, 0x00000002);
            var86 = ((int *) sp)[30];
            if (var85 != 0x00000000)
              goto label55;
            var87 = ((short *) sp)[72];
            if (!(((var87 < 0x00000009)) == 0x00000000))
            {
              var88 = ((int *) ((var87 << 0x00000002) + 0x00041F1C))[0];
              ((int *) sp)[32] = 0x00000001;
              ((int *) sp)[33] = var88;

            label54:
              var52 = ((int *) sp)[30];
              goto label55;
            }
          }
        }
        else
        {
          var50 = sceVshBridge_2EB0812A ();
          if (var50 == 0x00000002)
          {
            var47 = ((int *) sp)[32];
            goto label47;
          }
          else
          {
            var51 = ((int *) sp)[32];
            goto label54;
          }
        }
        var55 = sceVshBridge_4A596D2D (0x00000400, var52);
        var58 = IoFileMgrForUser_109F50BC (0x00038BF0, 0x00000203, 0x00000FFF);
        var59 = var58;
        if (var58 < 0)
        {
          sceVshCommonUtil_B5C86FBB (var1);
          var15 = var59;
        }
        else
        {
          var62 = IoFileMgrForUser_42EC03AC (var58, 0x00000000, 0x00000000);
          var63 = var62;
          if (var62 == 0x00000000)
          {
            IoFileMgrForUser_810C4BC3 (var59);
            var72 = vsh_6850458D (var12);
            var63 = var72;
            if (var72 != 0x00000000)
              goto label81;
            var75 = IoFileMgrForUser_F27A9C51 (0x00038BF0);
            var63 = var75;
            if (var75 != 0x00000000)
              goto label81;
            var78 = sceVshBridge_2380DC08 ("flashfat1:", 0x00005802, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
            var63 = var78;
            if (var78 >= 0)
            {

            label84:
              sceVshCommonUtil_B5C86FBB (var1);
              var15 = 0x00000000;
            }
            else
            {
              goto label81;
            }
          }
          else
          {
            IoFileMgrForUser_810C4BC3 (var59);
            goto label81;
          }
        }
      }
      else
      goto label84;
    }
  }
  else
  goto label13;
  ra = ((int *) sp)[46];
  var16 = ((int *) sp)[45];
  var17 = ((int *) sp)[44];
  var18 = ((int *) sp)[43];
  var19 = ((int *) sp)[42];
  var20 = ((int *) sp)[41];
  var21 = ((int *) sp)[40];
  sp = sp + 0x000000C0;
  return var15;
}

/**
 * Subroutine at address 0x000109D0
 */
int sub_109D0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  var1 = sp;
  ((int *) sp)[31] = ra;
  ((int *) sp)[28] = s0;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000001);
  var4 = sp + 0x00000010;
  var7 = IoFileMgrForUser_ACE946E8 ("flash1:/registry/init.dat", var4);
  var8 = sp;
  if (var7 == 0x00000000)
  {

  label10:
    sceVshCommonUtil_B5C86FBB (var13);
    var17 = 0x00000001;
  }
  else
  {
    var11 = vsh_1ECEF793 (((0x00000000 < (arg3 & 0x000000FF))), arg1, arg2);
    var12 = var11;
    var13 = sp;
    if (var12 == 0x80082714)
      goto label10;
    if (var12 != 0x00000000)
    {
      sceVshCommonUtil_B5C86FBB (var13);
      var17 = 0xFFFFFFFF;
    }
    else
    {
      var14 = sp;
      sceVshCommonUtil_B5C86FBB (var14);
      var17 = 0x00000000;
    }
  }
  ra = ((int *) sp)[31];
  var18 = ((int *) sp)[30];
  var19 = ((int *) sp)[29];
  var20 = ((int *) sp)[28];
  sp = sp + 0x00000080;
  return var17;
}

/**
 * Subroutine at address 0x00010A88
 */
int sub_10A88 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  var4 = sceRtc_3F7AD767 (var1);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return ((0x00000000 < var4));
}

/**
 * Subroutine at address 0x00010AA8
 */
void sub_10AA8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[26] = s2;
  var1 = arg1;
  ((int *) sp)[25] = s1;
  var2 = arg2;
  ((int *) sp)[27] = ra;
  ((int *) sp)[24] = s0;
  var5 = sceVshBridge_2EB0812A ();
  if (var5 == 0x00000001)
  {

  label10:
    var12 = sp;
    var15 = IoFileMgrForUser_ACE946E8 (0x00038C2C, var12);
    var16 = ((int *) sp)[2];
    if (var15 < 0)
    {

    label26:
      ra = ((int *) sp)[27];
    }
    else
    {
      ((int *) var2)[0] = var16;
      *((int *) 0x00047AEC) = var16;
      var17 = ((int *) var2)[0];
      var20 = scePaf_7C66F326 (var17);
      ((int *) var1)[0] = var20;
      *((int *) 0x00047AE8) = var20;
      var23 = IoFileMgrForUser_109F50BC (0x00038C2C, 0x00000001, 0x00000FFF);
      var24 = var23;
      if (var23 < 0)
        goto label26;
      var25 = ((int *) var1)[0];
      var26 = ((int *) var2)[0];
      var29 = IoFileMgrForUser_6A638D83 (var23, var25, var26);
      if (!(var29 < 0))
      {
      }
      IoFileMgrForUser_810C4BC3 (var24);
      ra = ((int *) sp)[27];
    }
  }
  else
  {
    var8 = sceVshBridge_2EB0812A ();
    if (var8 == 0x00000002)
    {
      goto label10;
    }
    else
    {
      goto label26;
    }
  }
  var9 = ((int *) sp)[26];
  var10 = ((int *) sp)[25];
  var11 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x00010B7C
 */
void sub_10B7C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sceVshBridge_2EB0812A ();
  if (var3 == 0x00000001)
  {
    var10 = *((int *) 0x00047AE8);

  label10:
    if (!(var10 == 0x00000000))
    {
      scePaf_19E81926 (var10);
      *((int *) 0x00047AE8) = 0x00000000;
      *((int *) 0x00047AEC) = 0x00000000;
    }
  }
  else
  {
    var4 = *((int *) 0x00047AE8);
    var7 = sceVshBridge_2EB0812A ();
    if (var7 == 0x00000002)
    {
      var10 = *((int *) 0x00047AE8);
      goto label10;
    }
    else
    {
      var8 = *((int *) 0x00047AE8);
    }
  }
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010BE0
 */
void vsh_BA2C15DF (int arg1, int arg2)
{
  var1 = *((int *) 0x00047AE8);
  var2 = *((int *) 0x00047AEC);
  ((int *) arg1)[0] = var1;
  ((int *) arg2)[0] = var2;
  return;
}

/**
 * Subroutine at address 0x00010C00
 */
void sub_10C00 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[44] = fp;
  ((int *) sp)[45] = ra;
  ((int *) sp)[43] = s7;
  ((int *) sp)[42] = s6;
  ((int *) sp)[41] = s5;
  ((int *) sp)[40] = s4;
  ((int *) sp)[39] = s3;
  ((int *) sp)[38] = s2;
  ((int *) sp)[37] = s1;
  ((int *) sp)[36] = s0;
  var1 = *((int *) 0x00038C44);
  var2 = *((int *) 0x00038C5C);
  var3 = *((int *) 0x00038C48);
  var4 = *((int *) 0x00038C60);
  var5 = *((int *) 0x00038C50);
  var6 = *((int *) 0x00038C4C);
  var7 = *((int *) 0x00038C54);
  var8 = *((int *) 0x00038C58);
  var9 = *((int *) 0x00038C78);
  var10 = *((int *) 0x00038C68);
  var11 = *((int *) 0x00038C6C);
  var12 = *((int *) 0x00038C70);
  var13 = *((int *) 0x00038C74);
  var14 = *((int *) 0x00038C64);
  ((int *) sp)[0] = var1;
  var15 = 0x00038C7C;
  ((int *) sp)[1] = var3;
  var16 = sp + 0x00000040;
  ((int *) sp)[2] = var6;
  ((int *) sp)[32] = arg2;
  ((int *) sp)[3] = var5;
  ((int *) sp)[4] = var7;
  ((int *) sp)[5] = var8;
  ((int *) sp)[6] = var2;
  ((int *) sp)[8] = var4;
  ((int *) sp)[9] = var14;
  ((int *) sp)[10] = var10;
  ((int *) sp)[11] = var11;
  ((int *) sp)[12] = var12;
  ((int *) sp)[13] = var13;
  ((int *) sp)[14] = var9;
  while (1) {
    var17 = ((int *) var15)[0];
    var18 = ((int *) var15)[1];
    var19 = ((int *) var15)[2];
    var20 = ((int *) var15)[3];
    ((int *) var16)[0] = var17;
    var15 = var15 + 0x00000010;
    var16 = var16 + 0x00000010;
    ((int *) var16)[1073741821] = var18;
    ((int *) var16)[1073741822] = var19;
    ((int *) var16)[1073741823] = var20;
    if (var15 != 0x00038CAC)
      continue;
    break;
  }
  var21 = 0x00000000;
  var22 = sp;
  while (1) {
    var23 = ((int *) var22)[8];
    var24 = 0x00000000;
    if ((arg1 & var23) != 0x00000000)
    {
      var34 = var22;
      var35 = sp;
      while (1) {
        var36 = ((int *) var35)[16];
        var37 = ((int *) var34)[0];
        var24 = var24 + 0x00000001;
        var40 = sceVshBridge_5C2983C2 (var37, var36);
        var41 = sp + 0x00000070;
        if (var40 == 0x00000001)
        {
          var43 = ((int *) var35)[16];
          var44 = ((int *) var34)[0];
          ((int *) sp)[28] = 0x00000010;
          ((int *) sp)[29] = var44;
          ((int *) sp)[30] = var43;
          var47 = sceVshBridge_2380DC08 ("umd0:", 0x01E18030, var41, 0x00000010, 0x00000000, 0x00000000);
          if (!(var47 != 0x00000001))
            break;
          var42 = (var24 < 0x0000000C);

        label16:
          var35 = var35 + 0x00000004;
          if (var42 != 0x00000000)
            continue;
          var21 = var21 + 0x00000001;
        }
        else
        {
          var42 = (var24 < 0x0000000C);
          goto label16;
        }
        goto label19;
      }
      var48 = ((int *) sp)[32];
      var49 = ((int *) var34)[8];
      var50 = ((int *) var48)[0];
      ((int *) var48)[0] = (var50 | var49);

    label18:
      var21 = var21 + 0x00000001;
    }
    else
    goto label18;

  label19:
    var22 = var22 + 0x00000004;
    if (((var21 < 0x00000007)) != 0x00000000)
      continue;
    break;
  }
  ra = ((int *) sp)[45];
  var25 = ((int *) sp)[44];
  var26 = ((int *) sp)[43];
  var27 = ((int *) sp)[42];
  var28 = ((int *) sp)[41];
  var29 = ((int *) sp)[40];
  var30 = ((int *) sp)[39];
  var31 = ((int *) sp)[38];
  var32 = ((int *) sp)[37];
  var33 = ((int *) sp)[36];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x00010DDC
 */
void sub_10DDC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  ((int *) sp)[0] = s0;
  var3 = sceVshBridge_2EB0812A ();
  if (((var3 < 0x00000003)) != 0x00000000)
  {
    sub_2D61C (0x00000007, 0x00005D64, 0x0002E6AC, 0x0002E94C);
    sub_2E014 (0x00010C00);
  }
  else
  {
    sub_2D61C (0x00000005, 0x00000000, 0x0002E6AC, 0x0002E94C);
  }
  vsh_C71F1AAC (0x00000001);
  sub_2E360 ();
  var10 = *((int *) 0x00047AE4);
  var11 = 0x00000002;
  if (!(var10 == 0x00000001))
  {
    var14 = sub_10A88 ();
    var11 = ((var14 ^ 0x00000001)) ? ((0x00000000 < (arg1 & 0x000000FF))) : 0x00000003;
  }
  sub_05B10 (var11, (arg2 & 0x000000FF));
  ra = ((int *) sp)[3];
  var17 = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010EB0
 */
void sub_10EB0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2E43C ();
  sub_2D6D8 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010ED4
 */
void sub_10ED4 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[7] = s7;
  ((int *) sp)[6] = s6;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var3 = sub_0D464 (0x00000001);
  var4 = var3;
  var7 = sub_0D464 (0x00000000);
  var8 = var7;
  var9 = ((unsigned char *) var4)[1];
  if (var9 == 0x00000000)
  {
    var12 = ((unsigned char *) var4)[0];
  }
  else
  {
    var10 = ((int *) var8)[3];
    if (var10 != 0x00000000)
    {
      var12 = ((unsigned char *) var4)[0];
    }
    else
    {
      var11 = ((int *) var8)[2];
      if (var11 == 0x00000000)
      {
        sub_0D43C ();
        var12 = ((unsigned char *) var4)[0];
      }
      else
      {
        var12 = ((unsigned char *) var4)[0];
      }
    }
  }
  ((char *) var4)[1] = 0x00000000;
  var13 = 0x00000000;
  if (var12 != 0x00000000)
  {

  label17:
    var13 = 0x00000001;
  }
  else
  {
    var14 = ((int *) var8)[3];
    if (!(var14 == 0x00000000))
      goto label17;
  }
  ((char *) var4)[0] = 0x00000001;
  var15 = 0x00000000;
  sub_101F4 ();
  sub_1028C (var13);
  var22 = sub_2F8C4 ();
  sub_10DDC (var13, ((0x00000000 < var22)));
  *((char *) 0x00047AE0) = 0x00000001;
  while (1) {
    var27 = sceDisplay_9C6EAAD7 ();
    var28 = *((int *) 0x00047AD0);
    var29 = *((int *) 0x00045664);
    *((int *) 0x00045664) = 0x00000001;
    *((int *) 0x00045668) = var29;
    scePaf_09FAB385 (var28, 0x00000001);
    scePaf_024052D4 ();
    scePaf_C1B9E355 ();
    var36 = *((int *) 0x00047AD0);
    var37 = *((int *) 0x00045668);
    scePaf_0FD1E3BB (var36, 0x00000001, var37);
    var40 = *((int *) 0x00000000);
    if (!(var40 == var15))
    {
      var15 = var40;
      vsh_E5463CE5 (0x00000001);
    }
    sub_0BA64 ();
    ThreadManForUser_349D6D6C ();
    while (1) {
      var49 = sceDisplay_9C6EAAD7 ();
      var50 = *((int *) 0x00045668);
      if ((((var49 - var27) < (var50 + 0xFFFFFFFF))) == 0x00000000)
        break;
      ThreadManForUser_CEADEB47 (0x00002095);
      continue;
    }
    var53 = *((int *) 0x00047AD0);
    scePaf_EDE28DAC (var53, 0x00000001);
    var56 = *((unsigned char *) 0x00047AE0);
    if (var56 != 0x00000000)
      continue;
    break;
  }
  sub_10EB0 ();
  sub_106AC ();
  sub_0BD64 ();
  sub_0D0A8 ();
  sub_34278 ();
  sceVshCommonUtil_D515D288 ();
  sceVshCommonGui_759F0369 ();
  scePaf_CFC5F330 ();
  ra = ((int *) sp)[8];
  var73 = ((int *) sp)[7];
  var74 = ((int *) sp)[6];
  var75 = ((int *) sp)[5];
  var76 = ((int *) sp)[4];
  var77 = ((int *) sp)[3];
  var78 = ((int *) sp)[2];
  var79 = ((int *) sp)[1];
  var80 = ((int *) sp)[0];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000110D0
 */
void sub_110D0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  SysMemUserForUser_91DE343C (0x05000010);
  SysMemUserForUser_F77D77CB (0x00030306);
  var7 = ThreadManForUser_446D8DE6 ("SCE_VSH_GRAPHICS", 0x00010ED4, 0x00000020, 0x00010000, 0x00004000, 0x00000000);
  var8 = 0x00000001;
  if (!(var7 <= 0))
  {
    var11 = ThreadManForUser_F475845D (var7, 0x00000000, 0x00000000);
    var8 = 0x00000000;
    if (var11 != 0x00000000)
    {
      ThreadManForUser_9FA03CD3 (var7);
      var8 = 0x00000001;
    }
  }
  ra = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00011168
 */
void sub_11168 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_CF5FBCE7 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00011184
 */
void sub_11184 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_934E0FAF ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000111A0
 */
void sub_111A0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sceVshBridge_C6395C03 (0x00047AF0, 0x00000001);
  var3 = *((int *) 0x00047AF4);
  ra = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  *((int *) 0x00047B00) = var3;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000111DC
 */
void sub_111DC (int arg1, int arg2)
{
  var1 = *((int *) 0x00047B00);
  var2 = 0x00000000;
  if ((var1 & 0x00020000) == 0x00000000)
  {
    var3 = *((unsigned char *) 0x00047AF8);
    var2 = 0x00000001;
    ((int *) arg1)[0] = (var3 + 0xFFFFFF80);
    var4 = *((unsigned char *) 0x00047AF9);
    ((int *) arg2)[0] = (var4 + 0xFFFFFF80);
  }
  else
  {
    ((int *) arg1)[0] = 0x00000000;
    ((int *) arg2)[0] = 0x00000000;
  }
  return;
}

/**
 * Subroutine at address 0x0001122C
 */
void sub_1122C ()
{
  *((char *) 0x00047AE0) = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x00011238
 */
void vsh_B34801F6 (int arg1)
{
  *((int *) 0x00045664) = arg1;
  return;
}

/**
 * Subroutine at address 0x00011244
 */
void vsh_BF38E49A ()
{
  var1 = *((int *) 0x00045668);
  return;
}

/**
 * Subroutine at address 0x00011250
 */
void sub_11250 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_05FFC (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00011270
 */
void sub_11270 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_05FFC (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00011290
 */
void sub_11290 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  scePaf_CA38E212 (arg1, 0x00080005, 0x00011E44, 0x00000000);
  scePaf_CA38E212 (var1, 0x00010001, 0x00012264, 0x00000000);
  scePaf_CA38E212 (var1, 0x00080003, 0x00011F1C, 0x00000000);
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00011300
 */
void sub_11300 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var4 = scePaf_48BB05D5 (0x00000E70);
  var5 = var4;
  if (var1 == 0x00000000)
  {

  label10:
    var15 = 0x00000000;
  }
  else
  {
    var8 = scePaf_A11DA28D ();
    var9 = ((int *) var1)[0];
    var10 = ((int *) var9)[0];
    var13 var14 = (*var10) (var1, var8);
    var15 = var1;
    if (!(var13 != 0x00000000))
      goto label10;
  }
  var16 = *((int *) 0x00047B1C);
  sub_19E40 (var5, var16, var15);
  *((int *) 0x00047B20) = var5;
  var21 = scePaf_AB9A6186 (0x00000000, 0x00016CD8, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00016D14);
  ra = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000113A0
 */
void sub_113A0 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  ((int *) sp)[10] = s2;
  ((int *) sp)[11] = ra;
  ((int *) sp)[9] = s1;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[47];
  if (!((var2 & 0x00000001) == 0x00000000))
  {
    var3 = ((int *) var1)[882];
    if (var3 != 0x00000000)
    {
      var74 = sp;
      scePaf_CD2E179B (var74);
      var77 = *((int *) 0x00047B20);
      var78 = ((int *) sp)[1];
      var79 = ((int *) var77)[882];
      ((int *) sp)[1] = (((var78 & 0xFFFF0000) | (0x00000000 & 0x0000FFFF)) | 0x00000408);
      var80 = ((int *) var79)[32];
      var83 var84 = (*var80) (var79);
      var85 = sp;
      ((int *) sp)[3] = var83;
      ((int *) sp)[4] = 0x00000000;
      sub_15A8C (var85);
      ((int *) sp)[0] = 0x00045458;
    }
    var4 = *((int *) 0x00047B20);
    var5 = ((int *) var4)[47];
    ((int *) var4)[47] = (((var5 | 0x00000100) & 0xFFFFFFFE) | (0x00000000 & 0x00000001));
    var1 = *((int *) 0x00047B20);
  }
  var6 = ((int *) var1)[47];
  var7 = *((int *) 0x00047B20);
  if (!((var6 & 0x00000008) == 0x00000000))
  {
    var8 = ((int *) var1)[882];
    if (var8 != 0x00000000)
    {
      var60 = sp;
      scePaf_CD2E179B (var60);
      var63 = *((int *) 0x00047B20);
      var64 = ((int *) sp)[1];
      var65 = ((int *) var63)[882];
      ((int *) sp)[1] = (((var64 & 0xFFFF0000) | (0x00000000 & 0x0000FFFF)) | 0x00000409);
      var66 = ((int *) var65)[33];
      var69 var70 = (*var66) (var65);
      var71 = sp;
      ((int *) sp)[3] = var69;
      ((int *) sp)[4] = 0x00000000;
      sub_15A8C (var71);
      ((int *) sp)[0] = 0x00045458;
    }
    var9 = *((int *) 0x00047B20);
    var10 = ((int *) var9)[47];
    ((int *) var9)[47] = (((var10 | 0x00000800) & 0xFFFFFFF7) | (0x00000000 & 0x00000001));
    var7 = *((int *) 0x00047B20);
  }
  var11 = ((int *) var7)[47];
  if (!((var11 & 0x00000002) == 0x00000000))
  {
    ((int *) var7)[47] = (((var11 | 0x00000200) & 0xFFFFFFFD) | (0x00000000 & 0x00000001));
  }
  var12 = ((int *) var7)[47];
  if ((var12 & 0x00000004) == 0x00000000)
  {
    var15 = *((int *) 0x00047B20);
  }
  else
  {
    var13 = ((int *) var7)[891];
    if (var13 != 0x00000000)
    {
      var15 = *((int *) 0x00047B20);
    }
    else
    {
      var14 = ((unsigned char *) var7)[273];
      if (var14 == 0x00000000)
      {
        sub_1199C ();
        var54 = *((int *) 0x00047B20);
        var57 = sub_21E8C (var54, 0x00000000);
        var58 = *((int *) 0x00047B20);
        var59 = ((int *) var58)[47];
        ((char *) var58)[355] = 0x00000001;
        ((int *) var58)[47] = (((var59 | 0x00000400) & 0xFFFFFFFB) | (0x00000000 & 0x00000001));
      }
      var15 = *((int *) 0x00047B20);
    }
  }
  var16 = ((int *) var15)[47];
  if (!((var16 & 0x00000010) == 0x00000000))
  {
    ((int *) var15)[47] = ((var16 & 0xFFFFFFEF) | (0x00000000 & 0x00000001));
  }
  var17 = ((int *) var15)[47];
  if ((var17 & 0x00000020) != 0x00000000)
  {
    var38 = ((int *) var15)[885];
    var41 = sub_1F7A4 (var15, var38);
    var42 = *((int *) 0x00047B20);
    if (!((var41 & 0x000000FF) != 0x00000000))
    {
      var43 = *((int *) 0x00047B20);
      var44 = ((int *) var43)[47];
      if ((var44 & 0x00000080) != 0x00000000)
      {
        ((int *) var43)[47] = ((var44 & 0xFFFFFF7F) | (0x00000000 & 0x00000001));
        sub_11C90 ();
        var43 = *((int *) 0x00047B20);
      }
      var45 = ((unsigned char *) var43)[356];
      if (var45 == 0x00000001)
      {
        var42 = *((int *) 0x00047B20);
      }
      else
      {
        var46 = *((int *) 0x00047B20);
        sub_2F958 ();
        var42 = *((int *) 0x00047B20);
      }
    }
    var49 = ((int *) var42)[47];
    ((int *) var42)[47] = ((var49 & 0xFFFFFFDF) | (0x00000000 & 0x00000001));
  }
  var18 = *((int *) 0x00047B20);
  var19 = ((int *) var18)[47];
  if ((var19 & 0x00000040) != 0x00000000)
  {
    var33 = ((int *) var18)[886];
    var36 = sub_1F7A4 (var18, var33);
    var18 = *((int *) 0x00047B20);
    var37 = ((int *) var18)[47];
    ((int *) var18)[47] = ((var37 & 0xFFFFFFBF) | (0x00000000 & 0x00000001));
  }
  var20 = ((int *) var18)[47];
  ra = ((int *) sp)[11];
  if ((var20 & 0x00000F00) == 0x00000F00)
  {
    var26 = scePaf_ED055C3C (arg1, 0x00000077);
    var27 = *((int *) 0x00047B20);
    var28 = ((int *) var27)[47];
    ((char *) var27)[357] = 0x00000001;
    ((char *) var27)[274] = 0x00000001;
    ((int *) var27)[48] = 0x00000000;
    if ((var28 & 0x00000080) != 0x00000000)
    {
      ((int *) var27)[47] = ((var28 & 0xFFFFFF7F) | (0x00000000 & 0x00000001));
      sub_11C90 ();
    }
    sub_2F958 ();
    ra = ((int *) sp)[11];
  }
  var21 = ((int *) sp)[10];
  var22 = ((int *) sp)[9];
  var23 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00011670
 */
void sub_11670 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[14] = s2;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[15] = s3;
  var2 = arg1;
  ((char *) var1)[273] = 0x00000001;
  ((int *) sp)[13] = s1;
  var3 = arg2;
  ((int *) sp)[16] = ra;
  ((int *) sp)[12] = s0;
  var6 = sub_21E8C (var1, 0x00000000);
  var7 = *((int *) 0x00047B20);
  var8 = ((int *) var7)[882];
  var9 = ((int *) var8)[35];
  var12 var13 = (*var9) ();
  ((int *) var7)[54] = var12;
  var14 = *((int *) 0x00047B20);
  ((int *) sp)[0] = 0x00000000;
  ((char *) var14)[355] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if (var2 == 0x00000002)
  {
    if (var3 == 0x00000004)
    {

    label16:
      var86 = *((int *) 0x00047B1C);

    label27:
      var72 = scePaf_970DC20D (var69, "msgshare_error_content_corrupted_game");
      var73 = sp;
      sub_33618 (var73, var72);
      var76 = *((int *) 0x00047B20);
      var77 = ((int *) var76)[882];
      var78 = ((int *) var77)[32];
      var81 var82 = (*var78) ();
      var19 = *((int *) 0x00047B20);
      if (var81 != 0x00000000)
      {

      label52:
        var17 = sub_2FA74 ();
        var18 = *((int *) 0x00047B20);
        if (var17 == 0x00000000)
        {
          var29 = *((int *) 0x00047B1C);
          ((int *) var18)[887] = 0x0001F858;
          var32 = scePaf_11FA6015 (var29, "page_dialog");
          var33 = *((int *) 0x00047B20);
          var34 = sp;
          var37 = sceVshCommonGui_B3B020CB (var32, var34, 0x00000002, 0x0001F8CC, 0x00000007, 0x00000000, var33);
          ((int *) var18)[885] = var37;
          if (var2 == 0x00000004)
          {
            var38 = *((int *) 0x00047B20);
            var50 = ((int *) var38)[885];
            ((int *) var38)[885] = 0x00000000;
            ((int *) var38)[884] = var50;
          }
          else
          {
            var38 = *((int *) 0x00047B20);
          }
          var39 = ((int *) var38)[651];
          var42 = scePaf_970DC20D (var39, "msgsystem_back");
          var43 = sp + 0x00000020;
          sceVshCommonGui_25489D52 (var43, var42);
          sub_335E8 (var43);
          sceVshCommonGui_A745DB12 (0x00000001);
        }
        else
        {
        case 0:
        case 1:
        case 5:
        case 6:
        case 7:
        case 8:

        label72:
          var19 = *((int *) 0x00047B20);

        label73:
          sub_1F858 (var19);
        }
      }
      else
      {
        goto label73;
      }
    }
    else
    {
      if (((var3 < 0x00000005)) == 0x00000000)
      {
        if (var3 != 0x00000008)
        {
          var19 = *((int *) 0x00047B20);
          goto label73;
        }
        else
        {
          var87 = *((int *) 0x00047B1C);
          goto label27;
        }
      }
      else
      {
        if (!(var3 != var2))
          goto label16;
        var19 = *((int *) 0x00047B20);
        goto label73;
      }
    }
  }
  else
  {
    if (var2 == 0x00000003)
    {
      if (((var3 < 0x0000000A)) == 0x00000000)
        goto label72;
      var68 = ((int *) ((var3 << 0x00000002) + 0x00041F40))[0];
      switch () {
      goto label72;
      goto label72;
      case 2:
        var69 = *((int *) 0x00047B1C);
        goto label27;
      case 3:
        var19 = *((int *) 0x00047B20);
        ((char *) var19)[355] = 0x00000001;
        goto label73;
      case 4:
        var83 = *((int *) 0x00047B1C);
        goto label27;
      goto label72;
      goto label72;
      goto label72;
      goto label72;
      case 9:
        vsh_E5463CE5 (0x00000002);
        var19 = *((int *) 0x00047B20);
        goto label73;
      }
    }
    else
    {
      if (var2 == 0x00000004)
      {
        if (var3 == 0x8001003E)
        {
          var61 = *((int *) 0x00047B1C);
          var64 = scePaf_970DC20D (var61, "msgvideoms_error_expired");
          var65 = sp;
          sub_33618 (var65, var64);
        }
        else
        {
          var51 = *((int *) 0x00047B1C);
          var54 = scePaf_970DC20D (var51, "msgshare_error_game_start");
          var55 = sp;
          sub_33618 (var55, var54);
          var58 = sp;
          sceVshCommonUtil_CFD3381F (var58, var3);
        }
      }
      else
      {
      }
      goto label52;
    }
  }
  var22 = sp;
  sub_335E8 (var22);
  ra = ((int *) sp)[16];
  var25 = ((int *) sp)[15];
  var26 = ((int *) sp)[14];
  var27 = ((int *) sp)[13];
  var28 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00011928
 */
int sub_11928 ()
{
  sp = sp + 0xFFFFFFC0;
  var1 = sp;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = s0;
  var2 = 0x00000001;
  ((int *) sp)[8] = 0x00000000;
  sceVshCommonUtil_D87E8E2D (var1, "/CONFIG/SYSTEM");
  var5 = sp;
  var6 = sp + 0x00000020;
  var9 = sceVshCommonUtil_7A73DC84 (var5, "umd_autoboot", var6);
  if (var9 != 0x00000000)
  {
    ((int *) sp)[8] = 0x00000001;
  }
  else
  {
    var2 = ((int *) sp)[8];
    if (!(((var2 < 0x00000002)) != 0x00000000))
    {
      var2 = 0x00000001;
      ((int *) sp)[8] = 0x00000001;
    }
  }
  var10 = sp;
  sceVshCommonUtil_625A9A5D (var10);
  ra = ((int *) sp)[13];
  var13 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var2;
}

/**
 * Subroutine at address 0x0001199C
 */
void sub_1199C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  var2 = ((unsigned char *) var1)[3556];
  if (var2 != 0x00000000)
  {
    ((char *) var1)[3556] = 0x00000000;
    var68 = sub_1B45C (var1, (var1 + 0x00000DE8), 0x00000007);
    var69 = var68;
    var72 = sub_18F50 ();
    if (var72 != 0x00000000)
    {
    }
    else
    {
      if (var69 == 0xFFFFFC0E)
      {
        var115 = *((int *) 0x00047B20);
        var116 = *((int *) 0x00047B20);
        var119 = sub_1B584 (var116, 0x00000014, 0x00000005);
        var120 = *((int *) 0x00047B20);
        var121 = ((int *) var120)[652];
      }
      else
      {
        var73 = *((int *) 0x00047B20);
        var74 = ((unsigned char *) var73)[3562];
        var75 = ((int *) var73)[892];
        sub_2437C (var75, var74, var69);
        var78 = *((int *) 0x00047B20);
        var79 = ((unsigned char *) var78)[3562];
        var80 = ((int *) var78)[652];
      }
      scePaf_5A774BDC (var80, var79, var69);
    }
    sub_17F30 (0x0000000D);
    var85 = *((int *) 0x00047B20);
    __asm__ ("mtc1       $zr, $fpr14;");
    var86 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var87 = ((int *) var85)[652];
    var88 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr13;"
      : 
      : "=r"(0x43480000));
    scePaf_6719522B (var87);
    var91 = *((int *) 0x00047B20);
    var92 = ((int *) var91)[652];
    var93 = ((int *) var92)[0];
    var94 = ((int *) var93)[47];
    var97 var98 = (*var94) (var92, 0x00000000, 0x00000000);
    sub_16644 (0x00000001);
    var103 = sceUmdUser_46EBB729 ();
    var104 = *((int *) 0x00047B20);
    if (!(var103 <= 0))
    {
      var104 = *((int *) 0x00047B20);
      ((char *) var104)[284] = 0x00000000;
    }
    var105 = ((int *) var104)[882];
    var106 = ((int *) var105)[33];
    var109 var110 = (*var106) ();
    var111 = *((int *) 0x00047B20);
    if (var109 == 0x00000002)
    {
      ((char *) var111)[285] = 0x00000001;
    }
    var112 = ((int *) var111)[890];
    var113 = (var112 >> 16) & 0x000000FF;
    ra = ((int *) sp)[2];
    if (((var113 < 0x00000008)) == 0x00000000)
    {

    label91:
      var21 = ((int *) sp)[1];
    }
    else
    {
      var114 = var112 & 0x000000FF;
      if (var114 == 0x00000002)
      {
        ((int *) ((var113 << 0x00000002) + var111))[80] = 0x00000001;

      label90:
        ra = ((int *) sp)[2];
        goto label91;
      }
      else
      {
        var21 = ((int *) sp)[1];
        if (!(var114 != 0x00000003))
        {
          ((int *) ((var113 << 0x00000002) + var111))[80] = 0x00000002;
        }
      }
    }
  }
  else
  {
    var3 = ((int *) var1)[663];
    if ((var3 & 0x00000100) != 0x00000000)
    {
      var55 = sub_1B290 (var1, 0x00000005, 0x00000002);
      var56 = *((int *) 0x00047B20);
      var57 = ((int *) var56)[652];
      scePaf_5A774BDC (var57, 0x00000005, var55);
      var60 = *((int *) 0x00047B20);
      var61 = ((unsigned char *) var60)[355];
      if (var61 == 0x00000000)
      {

      label67:
        sub_17F30 (0x0000000D);
        var35 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr14;");
        var36 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var37 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43480000));
        var38 = ((int *) var35)[652];
        scePaf_6719522B (var38);
        var41 = *((int *) 0x00047B20);
        var42 = ((int *) var41)[652];
        var43 = ((int *) var42)[0];
        var44 = ((int *) var43)[47];
        var47 var48 = (*var44) (var42, 0x00000000, 0x00000000);
        sub_16644 (0x00000001);
        ra = ((int *) sp)[2];
      }
      else
      {
        var64 = sub_11928 ();
        if (var64 == 0x00000000)
        {
          var65 = *((int *) 0x00047B20);
          goto label67;
        }
        else
        {
          var12 = *((int *) 0x00047B20);

        label86:
          __asm__ ("mtc1       $zr, $fpr12;");
          var13 = ((int *) var12)[652];
          __asm__ ("mov.s      $fpr13, $fpr12;");
          scePaf_043C75D2 (var13);
          var16 = *((int *) 0x00047B20);
          var17 = ((int *) var16)[47];
          ((int *) var16)[47] = (var17 | 0x00000080);
          var20 = sub_21E8C (var16, 0x00000001);
          goto label90;
        }
      }
    }
    else
    {
      if ((var3 & 0x00000400) == 0x00000000)
      {
        if ((var3 & 0x00000200) != 0x00000000)
        {

        label77:
          var25 = sub_1B290 (var1, 0x00000002, 0x00000002);
          var8 = *((int *) 0x00047B20);

        label83:
          var9 = ((int *) var8)[652];
          scePaf_5A774BDC (var9, 0x00000003, var7);
          var12 = *((int *) 0x00047B20);
          goto label86;
        }
        else
        {
          if (var3 == 0x00000080)
          {
            var28 = sub_1B290 (var1, 0x00000005, 0x00000002);
            var29 = *((int *) 0x00047B20);
          }
          else
          {
            var28 = sub_1B584 (var1, 0x00000014, 0x00000005);
            var29 = *((int *) 0x00047B20);
          }
          var30 = ((int *) var29)[652];
          scePaf_5A774BDC (var30, 0x00000005, var28);
          goto label67;
        }
      }
      else
      {
        var4 = ((int *) var1)[780];
        if (var4 == 0x00000008)
          goto label77;
        var7 = sub_1B290 (var1, 0x00000003, 0x00000002);
        var8 = *((int *) 0x00047B20);
        goto label83;
      }
    }
    goto label91;
  }
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00011C90
 */
void sub_11C90 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var3 = sub_11928 ();
  var4 = var3;
  var7 = sub_2FA74 ();
  var8 = *((int *) 0x00047B20);
  var9 = var7;
  var12 = sub_21E8C (var8, 0x00000000);
  var13 = *((int *) 0x00047B20);
  var14 = ((int *) var13)[652];
  var15 = ((int *) var14)[0];
  var16 = ((int *) var15)[47];
  var19 var20 = (*var16) (var14, 0x00000000, 0x00000000, var13);
  var21 = *((int *) 0x00047B20);
  var22 = ((int *) var21)[882];
  var23 = ((int *) var22)[35];
  var26 var27 = (*var23) ();
  var28 = ((int *) var21)[54];
  if (var28 == var26)
  {
    if ((((0x00000000 < var4)) & ((var9 < 0x00000001))) == 0x00000000)
    {
      var29 = *((int *) 0x00047B20);

    label47:
      __asm__ ("mtc1       $zr, $fpr14;");
      var30 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3F800000));
      var31 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr13;"
        : 
        : "=r"(0x43480000));
      var32 = ((int *) var29)[652];
      scePaf_6719522B (var32);
      sub_17F30 (0x0000000D);
      if (var9 == 0x00000000)
      {
        sub_16644 (0x00000001);
        ra = ((int *) sp)[4];
      }
      else
      {
        ra = ((int *) sp)[4];
      }
    }
    else
    {
      var43 = *((int *) 0x00047B20);
      var44 = *((int *) 0x00047B20);
      var45 = ((int *) var44)[663];
      if ((var45 & 0x00000400) == 0x00000000)
      {
        if ((var45 & 0x00000200) != 0x00000000)
        {
          var66 = sub_1B584 (var44, 0x0000000E, 0x00000002);
          var50 = 0x00000006;
          var51 = 0x00000001;
          if (var66 >= 0)
          {

          label38:
            sub_12674 (var50, var51);
            var55 = *((int *) 0x00047B20);
            var56 = ((unsigned char *) var55)[273];
            if (var56 != 0x00000000)
            {
              ra = ((int *) sp)[4];
            }
            else
            {
              var57 = *((int *) 0x00047B1C);
              scePaf_3C8DD7F0 (var57, "page_content_info_fg");
              ra = ((int *) sp)[4];
            }
          }
          else
          {
            var67 = *((int *) 0x00047B20);
            var49 = sub_1B584 (var67, 0x00000010, 0x00000002);
            var50 = 0x00000007;
            var51 = 0x00000003;

          label35:
            if (var49 < 0)
            {
              var29 = *((int *) 0x00047B20);
              goto label47;
            }
            else
            {
              var52 = *((int *) 0x00047B20);
              goto label38;
            }
          }
        }
        else
        {
          if ((var45 & 0x00000100) == 0x00000000)
          {
            var29 = *((int *) 0x00047B20);
            goto label47;
          }
          else
          {
            var60 = *((int *) 0x00047B20);
            var63 = sub_1B584 (var44, 0x00000015, 0x00000005);
            var50 = 0x00000001;
            if (var63 < 0)
            {

            label46:
              var29 = *((int *) 0x00047B20);
              goto label47;
            }
            else
            {
              var51 = 0x00000009;
              goto label38;
            }
          }
        }
      }
      else
      {
        var46 = ((int *) var44)[780];
        var49 = sub_1B584 (var44, 0x00000011, (((var46 ^ 0x00000008)) ? 0x00000003 : 0x00000002));
        var50 = 0x00000009;
        var51 = 0x00000000;
        goto label35;
      }
    }
  }
  else
  {
    goto label46;
  }
  var37 = ((int *) sp)[3];
  var38 = ((int *) sp)[2];
  var39 = ((int *) sp)[1];
  var40 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00011E44
 */
void sub_11E44 (int arg1, int arg2)
{
  var1 = ((unsigned short *) arg2)[2];
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  var2 = var1 + 0xFFFFFBFF;
  ((int *) sp)[0] = s0;
  if (((var2 < 0x0000000D)) == 0x00000000)
  {
  case 1:
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 11:

  label12:
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = ((int *) ((var2 << 0x00000002) + 0x00041F68))[0];
    switch () {
    case 0:
      var4 = *((int *) 0x00047B20);
      var5 = ((unsigned char *) var4)[276];
      ra = ((int *) sp)[1];
      if (!(var5 != 0x00000000))
      {
        var8 = sub_1B1B8 (var4);
        ra = ((int *) sp)[1];
        if (!(var8 == 0x00000000))
        {
          var11 = vsh_1B1CE2CF ();
          var12 = 0x00000001;
          if (!(var11 == 0x00000000))
          {
            var12 = 0x00000000;
          }
          sub_174C0 (var12);
          var15 = *((int *) 0x00047B20);
          sub_207BC (var15);
          ra = ((int *) sp)[1];
        }
      }
    goto label12;
    goto label12;
    goto label12;
    goto label12;
    goto label12;
    goto label12;
    case 7:
    case 8:
    case 9:
      sub_15A8C (arg2);
      goto label12;
    case 10:
      var21 = *((int *) 0x00047B20);
      ((char *) var21)[356] = 0x00000001;
      goto label12;
    goto label12;
    case 12:
      var22 = *((int *) 0x00047B20);
      ((char *) var22)[354] = 0x00000000;
      ((char *) var22)[356] = 0x00000000;
      var25 = sceUmdUser_46EBB729 ();
      if (var25 <= 0)
      {
        var27 = *((int *) 0x00047B20);
      }
      else
      {
        var26 = *((int *) 0x00047B20);
        ((char *) var26)[284] = 0x00000000;
      }
      goto label12;
    }
  }
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00011F1C
 */
void sub_11F1C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  sub_17640 (0x00000001);
  var3 = *((int *) 0x00047B20);
  var4 = ((unsigned char *) var3)[274];
  var5 = *((int *) 0x00047B20);
  if (var4 == 0x00000000)
  {

  label8:
  }
  else
  {
    var6 = ((unsigned char *) var3)[272];
    if (var6 != 0x00000000)
    {
    }
    else
    {
      ((char *) var3)[357] = 0x00000001;
      var5 = *((int *) 0x00047B20);
      goto label8;
    }
  }
  var7 = ((unsigned char *) var5)[273];
  ((char *) var5)[272] = 0x00000001;
  if (var7 == 0x00000000)
  {
    var40 = ((int *) var5)[652];
    var41 = ((int *) var40)[0];
    var42 = ((int *) var41)[47];
    var45 var46 = (*var42) (var40, 0x00000000, 0x00000000);
    var8 = *((int *) 0x00047B20);
  }
  else
  {
    var8 = *((int *) 0x00047B20);
  }
  sub_1F9DC (var8, 0x00000009);
  var11 = *((int *) 0x00047B20);
  var12 = ((unsigned char *) var11)[274];
  if (var12 == 0x00000000)
  {
    var15 = *((int *) 0x00047B20);
  }
  else
  {
    var13 = *((int *) 0x00047B20);
    var14 = ((unsigned char *) var11)[273];
    if (var14 == 0x00000000)
    {
      sub_17F30 (0x0000000D);
      sub_17F30 (0x00000000);
      var15 = *((int *) 0x00047B20);
    }
    else
    {
      var15 = *((int *) 0x00047B20);
    }
  }
  var16 = ((int *) var15)[653];
  if (var16 == 0x00000000)
  {
    var20 = *((int *) 0x00047B20);
  }
  else
  {
    var17 = ((int *) var16)[6];
    if (var17 != 0x00000000)
    {
      var35 = scePaf_C60EF86C (var17, 0x00000000);
      var18 = var35 & 0x000000FF;
    }
    else
    {
      var18 = 0x00000000 & 0x000000FF;
    }
    if (var18 == 0x00000000)
    {
      var29 = *((int *) 0x00047B20);
      var30 = ((unsigned char *) var29)[274];
      sub_16644 (var30);
      var20 = *((int *) 0x00047B20);
    }
    else
    {
      var19 = *((int *) 0x00047B20);
      var20 = *((int *) 0x00047B20);
    }
  }
  sub_1EF20 (var20, 0x00000001, 0xFFFFFFFF, 0xFFFFFFFF);
  var23 = *((int *) 0x00047B20);
  var24 = ((int *) var23)[61];
  if (((((var24 ^ 0x0000000E) < 0x00000001)) | (((var24 ^ 0x00000003) < 0x00000001))) != 0x00000000)
  {

  label46:
    sub_176A8 (0x00000002);
    ra = ((int *) sp)[2];
  }
  else
  {
    if (var24 == 0x00000004)
    {
      goto label46;
    }
    else
    {
      if (var24 == 0x0000001C)
      {
        goto label46;
      }
      else
      {
        if (var24 == 0x0000001F)
          goto label46;
        ra = ((int *) sp)[2];
      }
    }
  }
  var25 = ((int *) sp)[1];
  var26 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001208C
 */
void sub_1208C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg2)[4];
  var2 = *((int *) 0x00047B20);
  var3 = ((int *) arg2)[3];
  sub_1DE54 (var2, var3, var1, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000120B8
 */
void sub_120B8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) != 0x00000000)
  {

  label14:
    ra = ((int *) sp)[2];
  }
  else
  {
    var2 = *((int *) 0x00047B20);
    var3 = ((int *) var2)[70];
    if (!(var3 <= 0))
      goto label14;
    var6 = ((int *) arg2)[4];
    var7 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var6 < 0)
      goto label14;
    sceVshCommonGui_FA85A7E1 ("topmenu_plugin");
    var10 = *((int *) 0x00047B20);
    var13 = sub_1B0DC (var10);
    if (var13 == 0x00000000)
      goto label14;
    var14 = ((int *) arg2)[3];
    var15 = *((int *) 0x00047B20);
    ((int *) ((var14 << 0x00000002) + var15))[80] = 0x00000000;
    sub_12674 (0x00000001, 0x00000004);
    ra = ((int *) sp)[2];
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012154
 */
void sub_12154 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  var2 = *((int *) 0x00047B20);
  var3 = ((int *) arg2)[5];
  var4 = ((int *) var1)[6];
  var5 = ((int *) var2)[892];
  var6 = ((int *) var1)[3];
  var7 = ((int *) var1)[4];
  sub_24254 (var5, var3, var4, var6, var7);
  sub_16FA0 (0x00000000);
  var14 = scePaf_ED055C3C (arg1, 0x0000006F);
  var15 = ((unsigned short *) var1)[2];
  var16 = *((int *) 0x00047B20);
  if (!(var15 == 0x00000200))
  {
    var17 = ((int *) var1)[5];
    var18 = ((int *) var1)[3];
    if (var17 == var18)
    {
      ((int *) ((var17 << 0x00000002) + var16))[80] = 0x00000000;
    }
  }
  var21 = sub_208AC (var16);
  if (var21 != 0x00000000)
  {
    var31 = *((int *) 0x00047B20);
    sub_20628 (var31);
    var34 = *((int *) 0x00047B20);
    var35 = ((int *) var1)[5];
    var36 = ((int *) var1)[6];
    __asm__ ("mtc1       $zr, $fpr13;");
    var37 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42A00000));
    var38 = ((int *) var34)[652];
    scePaf_643C10AF (var38, var35, var36);
    var41 = *((int *) 0x00047B20);
    var42 = ((int *) var1)[3];
    var43 = ((int *) var41)[652];
    var44 = ((int *) var43)[216];
    var45 = ((int *) (var44 + (var42 << 0x00000002)))[0];
    scePaf_F3D3570C (var45);
    sub_1758C (0x00000000);
  }
  sub_16644 (0x00000001);
  var24 = ((int *) var1)[4];
  var25 = ((int *) var1)[3];
  sub_170AC (var25, var24);
  ra = ((int *) sp)[3];
  var28 = ((int *) sp)[2];
  var29 = ((int *) sp)[1];
  var30 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012264
 */
void sub_12264 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) == 0x00000000)
  {
    var4 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    sceVshCommonGui_FA85A7E1 ("topmenu_plugin");
    var7 = ((unsigned char *) arg2)[8];
    if (((var7 < 0x00000007)) == 0x00000000)
    {
      if (var7 == 0x0000001D)
      {

      label39:
        ra = ((int *) sp)[2];

      label40:
        var2 = ((int *) sp)[1];
      }
      else
      {
        if (((var7 < 0x0000001E)) == 0x00000000)
        {
          var13 = 0x00000050;
        }
        else
        {
          var13 = 0x00000007;
        }
        ra = ((int *) sp)[2];
        if (var7 != var13)
          goto label40;
        var14 = *((int *) 0x00047B20);
        var15 = ((int *) var14)[70];
        if (var15 > 0)
        {
          var2 = ((int *) sp)[1];
        }
        else
        {
          var18 = sub_1B644 (var14);
          var19 = var18;
          if (var18 == 0x00000000)
            goto label39;
          var20 = ((int *) var18)[6];
          var21 = *((int *) 0x00047B20);
          if (var20 < 0)
            goto label39;
          var22 = ((unsigned char *) var19)[28];
          var23 = ((int *) var21)[652];
          var24 = ((int *) var23)[206];
          ((int *) ((var24 << 0x00000002) + var21))[80] = 0x00000000;
          if (!(var22 == 0x00000000))
          {
            var25 = ((int *) var19)[0];
            if (var25 == 0x0000000D)
            {
              var39 = ((int *) var21)[651];
              scePaf_F1F9D49A (var39, "snd_category_decide");
            }
          }
          var26 = *((int *) 0x00047B20);
          sub_1F268 (var26);
          var29 = *((int *) 0x00047B20);
          var32 = sub_1B71C (var29);
          var33 = *((int *) 0x00047B20);
          var36 = sub_1B7D4 (var33);
          sub_12674 (var32, var36);
          ra = ((int *) sp)[2];
          goto label40;
        }
      }
    }
    else
    {
      ra = ((int *) sp)[2];
      if (((var7 < 0x00000005)) != 0x00000000)
        goto label40;
      var8 = *((int *) 0x00047B20);
      var9 = ((int *) var8)[70];
      var2 = ((int *) sp)[1];
      if (!(var9 > 0))
      {
        var10 = ((int *) var8)[62];
        sub_123AC (var10);
        ra = ((int *) sp)[2];
        goto label40;
      }
    }
  }
  else
  goto label39;
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000123AC
 */
void sub_123AC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  if (((arg1 < 0x0000001E)) == 0x00000000)
  {
  case 0:
  case 1:
  case 2:
  case 3:
  case 4:
  case 11:
  case 12:
  case 13:
  case 14:
  case 15:
  case 21:
  case 23:
  case 25:
  case 28:

  label68:
    ra = ((int *) sp)[4];
  }
  else
  {
    var2 = ((int *) ((arg1 << 0x00000002) + 0x00041F9C))[0];
    switch () {
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    case 5:
    case 6:
    case 8:
      var7 = *((int *) 0x00047B20);
      var10 = sub_20A04 (var7, 0x00000006);
      var11 = var10;
      if (var10 != 0x00000000)
      {
        var13 = *((int *) 0x00047B20);
        var14 = 0x0000000D;
        var17 = sub_1B644 (var13);
        if (var17 == 0x00000000)
        {
        }
        else
        {
          var18 = ((int *) var17)[2];
          if (var18 == 0x00000005)
          {
            if ((var11 & 0x00000004) == 0x00000000)
            {
            }
            else
            {
              var42 = *((int *) 0x00047B20);
              var1 = 0x00000005;
              var14 = 0x0000000C;

            label31:
              ((int *) var42)[62] = var1;

            label33:
            }
          }
          else
          {
            if (var18 == 0x00000006)
            {
              if ((var11 & 0x00000002) == 0x00000000)
              {
              }
              else
              {
                var42 = *((int *) 0x00047B20);
                var1 = 0x00000006;
                var14 = 0x00000004;
                goto label31;
              }
            }
            else
            {
              if (var18 == 0x00000008)
              {
                if ((var11 & 0x00000008) == 0x00000000)
                {
                }
                else
                {
                  var42 = *((int *) 0x00047B20);
                  var1 = 0x00000008;
                  var14 = 0x00000008;
                  goto label31;
                }
              }
              else
              {
                goto label33;
              }
            }
          }
        }
        if (var14 == 0x0000000D)
        {
          if ((var11 & 0x00000002) == var11)
          {

          label60:
            var41 = *((int *) 0x00047B20);
            var1 = 0x00000006;
            var14 = 0x00000004;

          label61:
            ((int *) var41)[62] = var1;

          label63:
            var19 = var1;
          }
          else
          {
            if ((var11 & 0x00000004) == var11)
            {
              var41 = *((int *) 0x00047B20);

            label54:
              var1 = 0x00000005;
              var14 = 0x0000000C;
              goto label61;
            }
            else
            {
              var22 = *((int *) 0x00047B20);
              if ((var11 & 0x00000008) == var11)
              {

              label58:
                var41 = *((int *) 0x00047B20);
                var1 = 0x00000008;
                var14 = 0x00000008;
                goto label61;
              }
              else
              {
                var25 = scePaf_A78805B0 ("launcher_plugin");
                if (var25 == 0x00000000)
                  goto label63;
                var28 = scePaf_4E87FDFC (var25, 0x00000001);
                if (var28 == 0x00000000)
                  goto label63;
                var29 = ((int *) var28)[2];
                var32 var33 = (*var29) ();
                if (var32 == 0x00000000)
                  goto label63;
                var34 = ((int *) var28)[1];
                var37 var38 = (*var34) (var32);
                var39 = var37;
                if (var39 == 0x00000004)
                {
                  var41 = *((int *) 0x00047B20);
                  goto label54;
                }
                else
                {
                  var40 = *((int *) 0x00047B20);
                  if (((var39 < 0x00000005)) == 0x00000000)
                  {
                    var19 = var1;
                    if (!(var39 != 0x00000008))
                      goto label58;
                  }
                  else
                  {
                    var19 = var1;
                    if (!(var39 != 0x00000002))
                      goto label60;
                  }
                }
              }
            }
          }
        }
        else
        {
          goto label63;
        }

      label64:
        sub_12674 (var19, var14);
        ra = ((int *) sp)[4];
      }
      else
      {
        var12 = *((int *) 0x00047B20);
        ((int *) var12)[62] = 0x00000001;
        goto label68;
      }
    case 7:
    case 9:
      var43 = *((int *) 0x00047B20);
      var14 = 0x00000005;
      sub_1F268 (var43);
      var19 = var1;
      goto label64;
    case 10:
    case 16:
    case 17:
    case 18:
    case 19:
    case 20:
    case 22:
    case 24:
    case 26:
    case 27:
      var14 = 0x00000001;
      goto label63;
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    goto label68;
    case 29:
      var14 = 0x00000007;
      goto label63;
    }
  }
  var3 = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000125B8
 */
void sub_125B8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[70];
  if (var2 <= 0)
  {
    var5 = ((int *) arg2)[4];
    var6 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var5 < 0)
    {

    label18:
      ra = ((int *) sp)[2];
    }
    else
    {
      sceVshCommonGui_FA85A7E1 ("topmenu_plugin");
      var9 = ((int *) arg2)[3];
      var10 = *((int *) 0x00047B20);
      ((int *) ((var9 << 0x00000002) + var10))[80] = 0x00000000;
      var13 = sub_1B644 (var10);
      var14 = var13;
      if (!(var13 == 0x00000000))
      {
        var15 = ((unsigned char *) var13)[28];
        if (var15 != 0x00000000)
        {
          var23 = *((int *) 0x00047B20);
          var24 = ((int *) var23)[651];
          scePaf_F1F9D49A (var24, "snd_category_decide");
        }
      }
      var16 = *((int *) 0x00047B20);
      sub_1F268 (var16);
      var19 = ((int *) var14)[3];
      var20 = ((int *) var14)[2];
      sub_12674 (var20, var19);
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label18;
  var3 = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012674
 */
void sub_12674 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  if (arg1 == 0x00000001)
  {
    sub_176A8 (arg2);
    ra = ((int *) sp)[4];
  }
  else
  {
    if (arg1 == 0x00000019)
    {
      var68 = vsh_E261B0EE ();
      if (var68 != 0x00000003)
      {
        var34 = *((int *) 0x00047B20);

      label89:
        var35 = ((int *) var34)[93];
        ((int *) var34)[778] = 0x0000000B;
        ((int *) var34)[668] = 0x0000000B;
        ((int *) var34)[723] = 0x0000000B;
        if (var35 <= 0)
        {

        label110:
          ra = ((int *) sp)[4];
        }
        else
        {
          sub_18F68 ();
          sub_18F80 ();
          sub_199EC ();
          ra = ((int *) sp)[4];
        }
      }
      else
      {
        var69 = *((int *) 0x00047B20);
        var72 = sceVshBridge_2EB0812A ();
        if (var72 == 0x00000001)
        {

        label22:
          if (var2 == 0x0000001F)
          {
            var58 = vsh_E261B0EE ();
            if (var58 != 0x00000006)
            {
              var34 = *((int *) 0x00047B20);
              goto label89;
            }
            else
            {
              var59 = *((int *) 0x00047B20);
              var62 = sceVshBridge_2EB0812A ();
              if (var62 == 0x00000001)
              {

              label38:
                if (var2 == 0x00000018)
                {
                  var55 = sceVshBridge_2EB0812A ();
                  if (var55 != 0x00000000)
                  {
                    var3 = var2 ^ 0x0000000F;

                  label46:
                    var4 = (var1 < 0x00000002);
                    if ((((var3 < 0x00000001)) & var4) != 0x00000000)
                    {
                      var42 = *((int *) 0x00047B20);
                      var45 = sub_1C948 (var42, var1);
                      if (var45 != 0x00000000)
                      {
                        var52 = sceVshBridge_4A596D2D (0x00008000, 0x00000000);
                        var5 = var2 ^ 0x00000009;

                      label62:
                        if ((((var5 < 0x00000001)) & var4) != 0x00000000)
                        {

                        label76:
                          var7 = *((int *) 0x00047B20);

                        label77:
                          var9 = var2;

                        label78:
                          var12 = sub_1EFF0 (var7, var9, var1);
                          if (var12 != 0x00000000)
                          {

                          label86:
                            var33 = sceVshBridge_4A596D2D (0x00008000, 0x00000001);

                          label88:
                            var34 = *((int *) 0x00047B20);
                            goto label89;
                          }
                          else
                          {
                            var13 = *((int *) 0x00047B20);
                            var16 = sub_1F19C (var13, var2, var1);
                            if (var16 != 0x00000000)
                              goto label86;

                          label97:
                            sub_16FA0 (0x00000000);
                            var19 = *((int *) 0x00047B20);
                            if (!(var2 == 0x0000000F))
                            {
                              ((int *) var19)[668] = 0x0000000B;
                            }
                            if ((((var2 + 0xFFFFFFFA) < 0x00000002)) != 0x00000000)
                            {
                            }
                            else
                            {
                              var20 = *((int *) 0x00047B20);
                              ((int *) var20)[723] = 0x0000000B;
                            }
                            var21 = *((int *) 0x00047B20);
                            if (!(var2 == 0x00000009))
                            {
                              ((int *) var21)[778] = 0x0000000B;
                            }
                            sub_15480 ();
                            var24 = *((int *) 0x00047B20);
                            ((int *) var24)[59] = var1;
                            ((int *) var24)[58] = var2;
                            sub_12994 (var2);
                            goto label110;
                          }
                        }
                        else
                        {
                          if (var2 == 0x00000007)
                          {
                            var7 = *((int *) 0x00047B20);
                            if ((((var1 + 0xFFFFFFFD) < 0x00000002)) != 0x00000000)
                              goto label77;
                            var6 = var2 ^ 0x00000006;

                          label69:
                            var7 = *((int *) 0x00047B20);
                            if ((((var6 < 0x00000001)) & var4) != 0x00000000)
                              goto label77;
                            var8 = var2 ^ 0x0000000B;
                            if (var2 == 0x0000000F)
                            {
                              var7 = *((int *) 0x00047B20);
                              if (((((var1 ^ 0x00000001) < 0x00000001)) | (((var1 ^ 0x00000006) < 0x00000001))) != 0x00000000)
                                goto label77;
                              var8 = var2 ^ 0x0000000B;

                            label73:
                              var7 = *((int *) 0x00047B20);
                              if ((((var8 < 0x00000001)) | (((var2 ^ 0x00000011) < 0x00000001))) != 0x00000000)
                                goto label77;
                              var9 = var2;
                              if (((((var2 ^ 0x00000017) < 0x00000001)) | (((var2 ^ 0x0000001B) < 0x00000001))) != 0x00000000)
                                goto label78;
                              if (((((var2 ^ 0x00000008) < 0x00000001)) & (((var1 ^ 0x00000005) < 0x00000001))) == 0x00000000)
                                goto label97;
                              goto label76;
                            }
                            else
                            goto label73;
                          }
                          else
                          {
                            var6 = var2 ^ 0x00000006;
                            goto label69;
                          }
                        }
                      }
                      else
                      {
                        var46 = *((int *) 0x00047B20);
                        if (var1 == 0x00000000)
                        {
                          var47 = 0x0000000F;

                        label58:
                          sub_1F2D8 (var46, var47);
                          var34 = *((int *) 0x00047B20);
                        }
                        else
                        {
                          if (var1 != 0x00000001)
                          {
                            var34 = *((int *) 0x00047B20);
                          }
                          else
                          {
                            var46 = *((int *) 0x00047B20);
                            var47 = 0x0000000E;
                            goto label58;
                          }
                        }
                        goto label89;
                      }
                    }
                    else
                    {
                      var5 = var2 ^ 0x00000009;
                      goto label62;
                    }
                  }
                  else
                  {
                    goto label88;
                  }
                }
                else
                {
                  var3 = var2 ^ 0x0000000F;
                  goto label46;
                }
              }
              else
              {
                var65 = sceVshBridge_2EB0812A ();
                if (var65 != 0x00000002)
                {
                  var34 = *((int *) 0x00047B20);
                  goto label89;
                }
                else
                {
                  goto label38;
                }
              }
            }
          }
          else
          {
            goto label38;
          }
        }
        else
        {
          var75 = sceVshBridge_2EB0812A ();
          if (var75 != 0x00000002)
          {
            var34 = *((int *) 0x00047B20);
            goto label89;
          }
          else
          {
            goto label22;
          }
        }
      }
    }
    else
    {
      goto label22;
    }
  }
  var27 = ((int *) sp)[3];
  var28 = ((int *) sp)[2];
  var29 = ((int *) sp)[1];
  var30 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00012994
 */
void sub_12994 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_1584C (arg1);
  if (var3 == 0x00000000)
  {
    var10 = sub_15964 (arg1);
    if (var10 < 0)
    {
      var14 = *((int *) 0x00047B20);
      var15 = ((int *) var14)[59];
      var16 = ((int *) var14)[58];
      sub_12A84 (var16, var15);
      ra = ((int *) sp)[1];
    }
    else
    {
      var11 = *((int *) 0x00047B20);
      ((char *) var11)[352] = 0x00000001;
      sub_12A28 ();
      ra = ((int *) sp)[1];
    }
  }
  else
  {
    var4 = *((int *) 0x00047B20);
    ((char *) var4)[352] = 0x00000001;
    scePaf_2788491B (var3, 0x00012A28);
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012A28
 */
void sub_12A28 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_16DF0 (0x00000006, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012A48
 */
void sub_12A48 ()
{
  sp = sp + 0xFFFFFFF0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[0] = ra;
  ((int *) var1)[62] = 0x00000001;
  ((int *) var1)[61] = 0x00000001;
  ((char *) var1)[352] = 0x00000000;
  ((int *) var1)[63] = 0x00000000;
  var2 = ((int *) var1)[59];
  var3 = ((int *) var1)[58];
  sub_12A84 (var3, var2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012A84
 */
void sub_12A84 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  if (arg1 == 0x00000001)
  {

  label72:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = (arg2 < 0x00000002);
    if (((((arg1 ^ 0x00000006) < 0x00000001)) & var3) != 0x00000000)
    {

    label29:

    label30:
      var6 = *((int *) 0x00047B20);
      var7 = ((int *) var6)[882];
      var8 = ((int *) var7)[35];
      var11 var12 = (*var8) (var3, var5, arg3, arg4, arg5, arg6, arg7, arg8);
      var13 = ((int *) var6)[54];

    label33:
      if (var13 == var11)
      {
        var22 = *((int *) 0x00047B20);

      label35:
        ((char *) var22)[272] = 0x00000000;
        sub_16FA0 (0x00000000);
        var25 = *((int *) 0x00047B20);
        var26 = ((int *) var25)[652];
        var29 = scePaf_ED055C3C (var26, 0x0000006F);
        var30 = *((int *) 0x00047B20);
        var33 = sub_208AC (var30);
        if (var33 != 0x00000000)
        {
          var65 = *((int *) 0x00047B20);
          sub_20628 (var65);
          sub_1758C (0x00000000);
          var34 = *((int *) 0x00047B20);
        }
        else
        {
          var34 = *((int *) 0x00047B20);
        }
        var35 = ((int *) var34)[652];
        var36 = ((int *) var35)[206];
        var39 = scePaf_BE7032D1 (var35, 0xFFFFFFFF);
        var40 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr13;");
        var41 = ((int *) var40)[652];
        var42 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        scePaf_643C10AF (var41, var36, var39);
        var45 = *((int *) 0x00047B20);
        sub_20978 (var45);
        var50 = sceVshCommonGui_414454B7 ();
        var51 = *((int *) 0x00047B20);
        if (var50 == 0x00000000)
        {

        label64:
        }
        else
        {
          if (!((((0x00000000 < (var2 ^ 0x00000005))) | ((0x00000000 < (var1 ^ 0x0000000B)))) == 0x00000000))
          {
            if ((((0x00000000 < (var2 ^ 0x00000001))) | ((0x00000000 < (var1 ^ 0x00000009)))) != 0x00000000)
            {
              var60 = *((int *) 0x00047B20);
              var61 = *((int *) 0x00047B1C);
              ((char *) var60)[275] = 0x00000000;
              var62 = 0x42C80000;
              __asm__ ("mtc1       $at, $fpr12;"
                : 
                : "=r"(0x42C80000));
              sceVshCommonGui_69A07897 (var61, "page_optionmenu", "page_topmenu");
              var51 = *((int *) 0x00047B20);
            }
            else
            {
              var52 = *((int *) 0x00047B20);
            }
            goto label64;
          }
        }
        ((char *) var51)[272] = 0x00000000;
        var55 = sub_21E8C (var51, 0x00000001);
        var56 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;");
        ((char *) var56)[352] = 0x00000001;
        var57 = ((int *) var56)[652];
        scePaf_485890F9 (var57, 0x00000074, 0x00012D14, 0x00000000);
        ra = ((int *) sp)[5];
      }
      else
      {
        var14 = *((int *) 0x00047B20);
        sub_154E0 ();
        goto label72;
      }
    }
    else
    {
      if (var2 == 0x00000009)
      {
        if ((var3 | (((arg2 ^ 0x00000005) < 0x00000001))) != 0x00000000)
          goto label30;

      label10:
        if (var2 == 0x00000007)
        {
          if ((((var1 + 0xFFFFFFFD) < 0x00000003)) != 0x00000000)
            goto label30;
          var4 = var2 ^ 0x0000000F;

        label15:
          var5 = (var4 < 0x00000001);
          if (!((var5 & var3) == 0x00000000))
            goto label29;
          if (var2 == 0x00000005)
          {

          label26:
            var71 = *((int *) 0x00047B20);
            var72 = ((int *) var71)[882];
            var73 = ((int *) var72)[36];
            var11 var76 = (*var73) (var3, var5, arg3, arg4, arg5, arg6, arg7, arg8);
            var13 = ((int *) var71)[55];
            goto label33;
          }
          else
          {
            if (var2 == 0x00000006)
            {
              if ((((var1 + 0xFFFFFFFE) < 0x00000002)) != 0x00000000)
                goto label26;
              var70 = var2 ^ 0x0000000A;

            label22:
              if ((((var70 < 0x00000001)) & var3) != 0x00000000)
                goto label26;
              if ((var5 & (((var1 ^ 0x00000002) < 0x00000001))) == 0x00000000)
              {
                var22 = *((int *) 0x00047B20);
                goto label35;
              }
              else
              {
                goto label26;
              }
            }
            else
            {
              var70 = var2 ^ 0x0000000A;
              goto label22;
            }
          }
        }
        else
        {
          var4 = var2 ^ 0x0000000F;
          goto label15;
        }
      }
      else
      {
        goto label10;
      }
    }
  }
  var17 = ((int *) sp)[4];
  var18 = ((int *) sp)[3];
  var19 = ((int *) sp)[2];
  var20 = ((int *) sp)[1];
  var21 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00012D14
 */
void sub_12D14 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[891];
  if (var2 != 0x00000000)
  {

  label15:
    var4 = *((int *) 0x00047B24);
    *((int *) 0x00047B24) = (var4 + 0x00000001);
    ra = ((int *) sp)[2];
  }
  else
  {
    var3 = *((int *) 0x00047B24);
    if (!(((var3 < 0x00000009)) == 0x00000000))
      goto label15;
    ((char *) var1)[352] = 0x00000000;
    *((int *) 0x00047B24) = 0x00000000;
    var9 = scePaf_ED055C3C (arg1, 0x00000074);
    var10 = *((int *) 0x00047B20);
    var13 = sub_21E8C (var10, 0x00000000);
    var14 = *((int *) 0x00047B20);
    sub_205D0 (var14);
    var17 = *((int *) 0x00047B20);
    var20 = sub_21E8C (var17, 0x00000001);
    var21 = *((int *) 0x00047B20);
    __asm__ ("mtc1       $zr, $fpr12;");
    ((char *) var21)[352] = 0x00000001;
    scePaf_485890F9 (arg1, 0x00000075, 0x00012DC8, 0x00000000);
    ra = ((int *) sp)[2];
  }
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012DC8
 */
void sub_12DC8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var3 = scePaf_9B514DA5 ();
  if (var3 == 0x00000000)
  {

  label7:
    var5 = *((int *) 0x00047B20);
    *((int *) 0x00047B28) = 0x00000000;
    ((char *) var5)[352] = 0x00000000;
    var8 = scePaf_ED055C3C (arg1, 0x00000075);
    var9 = *((int *) 0x00047B20);
    var12 = sub_21E8C (var9, 0x00000000);
    var13 = *((int *) 0x00047B20);
    var14 = ((int *) var13)[59];
    var15 = ((int *) var13)[58];
    sub_12E4C (var15, var14);
  }
  else
  {
    var4 = *((int *) 0x00047B28);
    if (!(((var4 < 0x00000005)) != 0x00000000))
      goto label7;
    *((int *) 0x00047B28) = (var4 + 0x00000001);
  }
  ra = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00012E4C
 */
void sub_12E4C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (!(arg1 == 0x00000001))
  {
    var3 = *((int *) 0x00047B20);
    ((char *) var3)[272] = 0x00000000;
  }
  var4 = (var1 < 0x00000002);
  if (((((var2 ^ 0x00000006) < 0x00000001)) & var4) != 0x00000000)
  {

  label32:
    var7 = *((int *) 0x00047B20);

  label33:
    var8 = ((int *) var7)[882];
    var9 = ((int *) var8)[35];
    var12 var13 = (*var9) (var4, var6, arg3, arg4, arg5, arg6, arg7, arg8);
    var14 = ((int *) var7)[54];

  label36:
    if (var14 == var12)
    {
      var22 = *((int *) 0x00047B20);

    label38:
      var23 = ((int *) ((var2 << 0x00000002) + var22))[0];
      if (var23 != 0x00000000)
      {
        sub_12FD4 (var2, var1);
        ra = ((int *) sp)[4];
      }
      else
      {
        sub_16DF0 (0x00000005, 0x00000000);
        ra = ((int *) sp)[4];
      }
    }
    else
    {
      var15 = *((int *) 0x00047B20);
      sub_154E0 ();
      ra = ((int *) sp)[4];
    }
  }
  else
  {
    if (var2 == 0x00000009)
    {
      if ((var4 | (((var1 ^ 0x00000005) < 0x00000001))) != 0x00000000)
      {
        var7 = *((int *) 0x00047B20);
        goto label33;
      }
      else
      {

      label12:
        if (var2 == 0x00000007)
        {
          if ((((var1 + 0xFFFFFFFD) < 0x00000003)) != 0x00000000)
          {
            var7 = *((int *) 0x00047B20);
            goto label33;
          }
          else
          {
            var5 = var2 ^ 0x0000000F;

          label18:
            var6 = (var5 < 0x00000001);
            if (!((var6 & var4) == 0x00000000))
              goto label32;
            var28 = *((int *) 0x00047B20);
            if (var2 == 0x00000005)
            {

            label29:
              var30 = ((int *) var28)[882];
              var31 = ((int *) var30)[36];
              var12 var34 = (*var31) (var4, var6, arg3, arg4, arg5, arg6, arg7, arg8);
              var14 = ((int *) var28)[55];
              goto label36;
            }
            else
            {
              if (var2 == 0x00000006)
              {
                var28 = *((int *) 0x00047B20);
                if ((((var1 + 0xFFFFFFFE) < 0x00000002)) != 0x00000000)
                  goto label29;
                var29 = var2 ^ 0x0000000A;

              label25:
                var28 = *((int *) 0x00047B20);
                if ((((var29 < 0x00000001)) & var4) != 0x00000000)
                  goto label29;
                if ((var6 & (((var1 ^ 0x00000002) < 0x00000001))) == 0x00000000)
                {
                  var22 = *((int *) 0x00047B20);
                  goto label38;
                }
                else
                {
                  var28 = *((int *) 0x00047B20);
                  goto label29;
                }
              }
              else
              {
                var29 = var2 ^ 0x0000000A;
                goto label25;
              }
            }
          }
        }
        else
        {
          var5 = var2 ^ 0x0000000F;
          goto label18;
        }
      }
    }
    else
    {
      goto label12;
    }
  }
  var18 = ((int *) sp)[3];
  var19 = ((int *) sp)[2];
  var20 = ((int *) sp)[1];
  var21 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00012FD4
 */
void sub_12FD4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[50] = s2;
  var1 = arg1;
  ((int *) sp)[49] = s1;
  var2 = arg2;
  ((int *) sp)[57] = ra;
  ((int *) sp)[56] = fp;
  ((int *) sp)[55] = s7;
  ((int *) sp)[54] = s6;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[48] = s0;
  if (arg1 == 0x00000019)
  {
    var963 = vsh_E261B0EE ();
    if (var963 != 0x00000003)
    {
    case 0:
    case 14:

    label797:
      sub_154E0 ();

    label799:
      ra = ((int *) sp)[57];
    }
    else
    {
      var966 = sceVshBridge_2EB0812A ();
      if (var966 == 0x00000001)
      {

      label16:
        if (var1 == 0x0000001F)
        {
          var954 = vsh_E261B0EE ();
          if (var954 != 0x00000006)
            goto label797;
          var957 = sceVshBridge_2EB0812A ();
          if (var957 == 0x00000001)
          {

          label31:
            if (var1 == 0x00000018)
            {
              var951 = sceVshBridge_2EB0812A ();
              if (var951 != 0x00000000)
              {
                var3 = var1 ^ 0x00000006;

              label39:
                var4 = (var2 < 0x00000002);
                if ((((var3 < 0x00000001)) & var4) != 0x00000000)
                {

                label67:

                label68:
                  var7 = *((int *) 0x00047B20);
                  var8 = ((int *) var7)[882];
                  var9 = ((int *) var8)[35];
                  var12 var13 = (*var9) (var4, var6, arg3, arg4, arg5, arg6, arg7, arg8);
                  var14 = ((int *) var7)[54];

                label71:
                  if (var14 == var12)
                  {
                    var26 = (var1 < 0x00000021);

                  label73:
                    if (var26 == 0x00000000)
                    {
                      goto label797;
                    }
                    else
                    {
                      var27 = var1 << 0x00000002;
                      var28 = ((int *) (var27 + 0x00042014))[0];
                      switch () {
                      goto label797;
                      case 1:
                        sub_176A8 (var2);
                        ra = ((int *) sp)[57];
                        goto label800;
                      case 2:
                        var33 = scePaf_A78805B0 (0x00038E38);
                        if (var33 == 0x00000000)
                        {
                          var79 = sp;
                          scePaf_5A693901 (var79);
                          var82 = sp;
                          sub_318F0 (var82, 0x00038E38);
                          var85 = sp + 0x0000000C;
                          sub_318F0 (var85, "topmenu_plugin");
                          var88 = sp + 0x00000028;
                          sub_318F0 (var88, "flash0:/vsh/resource/sysconf_plugin.rco");
                          var91 = sp + 0x00000070;
                          ((int *) sp)[15] = 0x000C0000;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[14] = 0x00000031;
                          var93 = sp + 0x00000098;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var91, 0x00038E70);
                          var98 = sub_31824 (var92, var91);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var98)[0] = 0x00000000;
                          ((int *) var98)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var98 + 0x00000008), var93);
                          sub_317D8 (var93);
                          sub_317D8 (var91);
                          var105 = sp + 0x00000050;
                          sub_318F0 (var105, "flash0:/vsh/module/sysconf_plugin.prx");
                          var108 = *((int *) 0x00047B20);
                          var109 = ((unsigned char *) var108)[358];
                          ((int *) sp)[24] = 0x00000001;
                          ((int *) sp)[25] = 0x0000000C;
                          ((int *) sp)[23] = 0x00000001;
                          if (var109 != 0x00000000)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var91, "SwitchPlugin_Ptr");
                            var130 = sub_31824 (var92, var91);
                            var131 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var132 = var131 + 0x0000017C;
                            ((int *) sp)[37] = var132;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var130)[0] = 0x00000000;
                            ((int *) var130)[1] = var132;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var130 + 0x00000008), var93);
                            sub_317D8 (var93);
                            sub_317D8 (var91);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var91, "SwitchPlugin_Size");
                            var143 = sub_31824 (var92, var91);
                            var144 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var145 = ((int *) var144)[351];
                            ((int *) var143)[0] = 0x00000000;
                            ((int *) sp)[37] = var145;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var143)[1] = var145;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var143 + 0x00000008), var93);
                            sub_317D8 (var93);
                            sub_317D8 (var91);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var91, 0x00038E70);
                            var156 = sub_31824 (var92, var91);
                            var157 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var158 = ((int *) var157)[94];
                            ((int *) var156)[0] = 0x00000000;
                            ((int *) sp)[37] = var158;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var156)[1] = var158;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var156 + 0x00000008), var93);
                            sub_317D8 (var93);
                            var163 = var91;

                          label740:
                            sub_317D8 (var163);
                            var166 = *((int *) 0x00047B20);
                            ((char *) var166)[358] = 0x00000000;
                          }

                        label743:

                        label744:
                          var110 = sp;
                          scePaf_36C437F1 (var110, 0x00015290);
                          var113 = sp + 0x00000050;
                          sub_317D8 (var113);
                          sub_31808 (var92);
                          sub_317D8 (var88);
                          var120 = var85;

                        label753:
                          sub_317D8 (var120);
                          var123 = sp;
                          sub_317D8 (var123);
                        }
                        else
                        {

                        label758:
                          var36 = scePaf_A78805B0 (0x00038E38);
                          if (!(var36 == 0x00000000))
                          {
                            var39 = scePaf_4E87FDFC (var36, 0x00000001);
                            if (var39 == 0x00000000)
                            {
                            }
                            else
                            {
                              var40 = ((int *) var39)[0];

                            label766:
                              var43 var44 = (*var40) (var2);
                              var45 = *((int *) 0x00047B20);
                              var46 = 0x43480000;
                              __asm__ ("mtc1       $at, $fpr12;"
                                : 
                                : "=r"(0x43480000));
                              var47 = ((int *) var45)[652];
                              ((char *) var45)[357] = 0x00000000;
                              var48 = ((int *) var47)[206];
                              var49 = ((int *) var47)[216];
                              var50 = ((int *) (var49 + (var48 << 0x00000002)))[0];
                              scePaf_676BAC3B (var50);
                            }

                          label771:
                            var53 = *((int *) 0x00047B20);
                            sub_21F88 (var53, 0x00000000);
                            var56 = *((int *) 0x00047B20);

                          label774:
                            var59 = sub_21E8C (var56, 0x00000000);
                            var60 = *((int *) 0x00047B20);
                            var61 = ((int *) var60)[93];
                            if (var61 <= 0)
                            {
                            }
                            else
                            {
                              ((int *) var60)[93] = 0xFFFFFFFF;
                              sub_18F80 ();
                              sub_199EC ();
                            }
                            sub_199EC ();
                            var68 = *((int *) 0x00047B20);
                            var69 = ((int *) var68)[48];
                            ((int *) var68)[48] = ((var69 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
                          }
                        case 13:
                        case 17:
                        case 23:
                        case 32:

                        label785:
                        }

                      label786:
                        var70 = 0x43480000;
                        __asm__ ("mtc1       $at, $fpr12;"
                          : 
                          : "=r"(0x43480000));
                        sceVshCommonGui_FA85A7E1 ("topmenu_plugin");
                        sub_17640 (0x00000000);
                        var75 = *((int *) 0x00047B20);
                        sub_1EF20 (var75, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF);
                        var78 = *((int *) 0x00047B20);
                        ((int *) var78)[61] = var1;
                        goto label799;
                      case 3:
                        var167 = "netconf_plugin";
                        var170 = scePaf_A78805B0 (0x00038EC8);
                        if (var170 == 0x00000000)
                        {
                          var177 = *((int *) 0x00047B20);
                          var178 = sp;
                          var85 = sp + 0x0000000C;
                          var179 = ((int *) var177)[3];
                          scePaf_5A693901 (var178);
                          var182 = sp;
                          sub_318F0 (var182, 0x00038EC8);
                          sub_318F0 (var85, "topmenu_plugin");
                          var187 = ((int *) var179)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var187;
                          var188 = ((int *) var179)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var188;
                          var190 = sp + 0x00000098;
                          var191 = ((int *) var179)[3];
                          ((int *) sp)[9] = var191;
                          sub_318F0 (var88, "flash0:/vsh/resource/netconf_dialog.rco");
                          ((int *) sp)[14] = 0x00000062;
                          ((int *) sp)[15] = 0x00008000;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var189, 0x00038E70);
                          var198 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var198)[0] = 0x00000000;
                          ((int *) var198)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var198 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var205 = *((int *) 0x00047B20);
                          var206 = 0x0000000D;

                        label648:
                          var207 = ((unsigned char *) var205)[358];
                          ((int *) sp)[25] = var206;
                          if (!(var207 == 0x00000000))
                          {

                          label650:
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var189, "SwitchPlugin_Ptr");
                            var212 = sub_31824 (var92, var189);
                            var213 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var214 = var213 + 0x0000017C;
                            ((int *) sp)[37] = var214;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var212)[0] = 0x00000000;
                            ((int *) var212)[1] = var214;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var212 + 0x00000008), var190);
                            sub_317D8 (var190);
                            sub_317D8 (var189);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var189, "SwitchPlugin_Size");
                            var225 = sub_31824 (var92, var189);
                            var226 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var227 = ((int *) var226)[351];
                            ((int *) var225)[0] = 0x00000000;
                            ((int *) sp)[37] = var227;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var225)[1] = var227;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var225 + 0x00000008), var190);
                            sub_317D8 (var190);
                            sub_317D8 (var189);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var189, 0x00038E70);
                            var238 = sub_31824 (var92, var189);
                            var239 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var240 = ((int *) var239)[94];
                            ((int *) var238)[0] = 0x00000000;
                            ((int *) sp)[37] = var240;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var238)[1] = var240;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var238 + 0x00000008), var190);
                            sub_317D8 (var190);
                            var163 = var189;
                            goto label740;
                          }
                          goto label743;
                        }
                        else
                        {

                        label679:
                          var173 = scePaf_A78805B0 (var167);
                          if (!(var173 == 0x00000000))
                          {
                            var176 = scePaf_4E87FDFC (var173, 0x00000001);
                            if (var176 == 0x00000000)
                            {
                            }
                            else
                            {
                              var40 = ((int *) var176)[3];
                              goto label766;
                            }
                            goto label771;
                          }
                          goto label785;
                        }
                        goto label786;
                      case 4:
                        var247 = scePaf_A78805B0 (0x00038F00);
                        if (var247 == 0x00000000)
                        {
                          var248 = *((int *) 0x00047B20);
                          var249 = sp;
                          var85 = sp + 0x0000000C;
                          var250 = ((int *) var248)[4];
                          scePaf_5A693901 (var249);
                          var253 = sp;
                          sub_318F0 (var253, 0x00038F00);
                          sub_318F0 (var85, "topmenu_plugin");
                          var258 = ((int *) var250)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var258;
                          var259 = ((int *) var250)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var259;
                          var190 = sp + 0x00000098;
                          var260 = ((int *) var250)[3];
                          ((int *) sp)[9] = var260;
                          sub_318F0 (var88, "flash0:/vsh/resource/update_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var189, 0x00038E70);
                          var267 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var267)[0] = 0x00000000;
                          ((int *) var267)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var267 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var205 = *((int *) 0x00047B20);
                          var206 = 0x0000000F;
                          goto label648;
                        }
                        else
                        {
                          goto label758;
                        }
                        goto label786;
                      case 5:
                      case 6:
                      case 8:
                        var276 = scePaf_A78805B0 (0x00038E00);
                        if (var276 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var277 = *((int *) 0x00047B20);
                          var278 = sp;
                          var85 = sp + 0x0000000C;
                          var279 = ((int *) (var27 + var277))[0];
                          scePaf_5A693901 (var278);
                          var282 = sp;
                          sub_318F0 (var282, 0x00038E00);
                          sub_318F0 (var85, "topmenu_plugin");
                          var287 = ((int *) var279)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var287;
                          var288 = ((int *) var279)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var288;
                          var190 = sp + 0x00000098;
                          var289 = ((int *) var279)[2];
                          ((int *) sp)[8] = var289;
                          var290 = ((int *) var279)[3];
                          ((int *) sp)[9] = var290;
                          sub_318F0 (var88, "flash0:/vsh/resource/common_page.rco");

                        label590:
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var189, 0x00038E70);
                          var297 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var297)[0] = 0x00000000;
                          ((int *) var297)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var297 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var304 = *((int *) 0x00047B20);
                          ((int *) sp)[25] = 0x00000000;
                          var305 = ((unsigned char *) var304)[358];
                          if (var305 == 0x00000000)
                          {
                          }
                          else
                          {
                            goto label650;
                          }
                          goto label744;
                        }
                        goto label786;
                      case 7:
                      case 9:
                        var308 = scePaf_A78805B0 (0x00038F60);
                        if (var308 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var309 = *((int *) 0x00047B20);
                          var310 = sp;
                          var311 = sp + 0x0000000C;
                          var312 = ((int *) (var27 + var309))[0];
                          scePaf_5A693901 (var310);
                          var315 = sp;
                          sub_318F0 (var315, 0x00038F60);
                          sub_318F0 (var311, "topmenu_plugin");
                          var320 = ((int *) var312)[0];
                          var321 = sp + 0x00000028;
                          ((int *) sp)[6] = var320;
                          var322 = ((int *) var312)[3];
                          var323 = sp + 0x00000070;
                          var324 = sp + 0x00000044;
                          ((int *) sp)[9] = var322;
                          var325 = sp + 0x00000098;
                          var326 = ((int *) var312)[1];
                          ((int *) sp)[7] = var326;
                          var327 = ((int *) var312)[2];
                          ((int *) sp)[8] = var327;
                          sub_318F0 (var321, "flash0:/vsh/resource/common_page.rco");
                          ((int *) sp)[15] = 0x00100000;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var323, "action");
                          var334 = sub_31824 (var324, var323);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var334)[0] = 0x00000000;
                          ((int *) var334)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var334 + 0x00000008), var325);
                          sub_317D8 (var325);
                          sub_317D8 (var323);
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var323, "umd_title");
                          var345 = sub_31824 (var324, var323);
                          var346 = var345;
                          ((int *) sp)[36] = 0x00000002;
                          ((int *) sp)[38] = 0x00000000;
                          ((int *) sp)[39] = 0x00000000;
                          sub_318F0 (var325, "UMD VIDEO - ");
                          var349 = ((int *) sp)[36];
                          ((int *) var346)[0] = var349;
                          var350 = ((int *) sp)[37];
                          ((int *) var346)[1] = var350;
                          sub_31940 ((var346 + 0x00000008), var325);
                          sub_317D8 (var325);
                          sub_317D8 (var323);
                          var357 = *((int *) 0x00047B20);
                          ((int *) sp)[25] = 0x0000000C;
                          var358 = ((unsigned char *) var357)[358];
                          if (var358 != 0x00000000)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var323, "SwitchPlugin_Ptr");
                            var373 = sub_31824 (var324, var323);
                            var374 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var375 = var374 + 0x0000017C;
                            ((int *) sp)[37] = var375;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var373)[0] = 0x00000000;
                            ((int *) var373)[1] = var375;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var373 + 0x00000008), var325);
                            sub_317D8 (var325);
                            sub_317D8 (var323);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var323, "SwitchPlugin_Size");
                            var386 = sub_31824 (var324, var323);
                            var387 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var388 = ((int *) var387)[351];
                            ((int *) var386)[0] = 0x00000000;
                            ((int *) sp)[37] = var388;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var386)[1] = var388;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var386 + 0x00000008), var325);
                            sub_317D8 (var325);
                            sub_317D8 (var323);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var323, "action");
                            var399 = sub_31824 (var324, var323);
                            var400 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var401 = ((int *) var400)[94];
                            ((int *) var399)[0] = 0x00000000;
                            ((int *) sp)[37] = var401;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var399)[1] = var401;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var399 + 0x00000008), var325);
                            sub_317D8 (var325);
                            sub_317D8 (var323);
                            var408 = *((int *) 0x00047B20);

                          label565:
                            ((char *) var408)[358] = 0x00000000;
                          }

                        label566:

                        label567:

                        label568:
                          var359 = sp;
                          scePaf_36C437F1 (var359, 0x00015290);
                          var362 = sp + 0x00000050;
                          sub_317D8 (var362);
                          sub_31808 (var324);
                          sub_317D8 (var321);
                          var120 = var311;
                          goto label753;
                        }
                        goto label786;
                      case 10:
                        var411 = scePaf_A78805B0 (0x00038F94);
                        if (var411 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var412 = *((int *) 0x00047B20);
                          var413 = sp;
                          var85 = sp + 0x0000000C;
                          var414 = ((int *) var412)[10];
                          scePaf_5A693901 (var413);
                          var417 = sp;
                          sub_318F0 (var417, 0x00038F94);
                          sub_318F0 (var85, "topmenu_plugin");
                          var422 = ((int *) var414)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var422;
                          var423 = ((int *) var414)[3];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[9] = var423;
                          var190 = sp + 0x00000098;
                          var424 = ((int *) var414)[1];
                          ((int *) sp)[7] = var424;
                          var425 = ((int *) var414)[2];
                          ((int *) sp)[8] = var425;
                          sub_318F0 (var88, "flash0:/vsh/resource/common_page.rco");
                          var428 = var189;
                          var429 = 0x000C0000;

                        label487:
                          ((int *) sp)[15] = var429;

                        label488:
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var428, 0x00038E70);
                          var434 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var434)[0] = 0x00000000;
                          ((int *) var434)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var434 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var205 = *((int *) 0x00047B20);
                          var206 = 0x0000000C;
                          goto label648;
                        }
                        goto label786;
                      case 11:
                        var443 = scePaf_A78805B0 (0x00038FA4);
                        if (var443 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var444 = *((int *) 0x00047B20);
                          var445 = sp;
                          var85 = sp + 0x0000000C;
                          var446 = ((int *) var444)[11];
                          scePaf_5A693901 (var445);
                          var449 = sp;
                          sub_318F0 (var449, 0x00038FA4);
                          sub_318F0 (var85, "topmenu_plugin");
                          var454 = ((int *) var446)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var454;
                          var455 = ((int *) var446)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var455;
                          var190 = sp + 0x00000098;
                          var456 = ((int *) var446)[3];
                          ((int *) sp)[9] = var456;
                          sub_318F0 (var88, "flash0:/vsh/resource/savedata_plugin.rco");
                          var428 = var189;
                          var429 = 0x00200000;
                          goto label487;
                        }
                        goto label786;
                      case 12:
                        var167 = "netplay_client_plugin";
                        var461 = scePaf_A78805B0 (0x00038FE0);
                        if (var461 != 0x00000000)
                          goto label679;
                        var462 = *((int *) 0x00047B20);
                        var463 = sp;
                        var85 = sp + 0x0000000C;
                        var464 = ((int *) var462)[12];
                        scePaf_5A693901 (var463);
                        var467 = sp;
                        sub_318F0 (var467, 0x00038FE0);
                        sub_318F0 (var85, "topmenu_plugin");
                        var472 = ((int *) var464)[0];
                        var88 = sp + 0x00000028;
                        ((int *) sp)[6] = var472;
                        var473 = ((int *) var464)[1];
                        var189 = sp + 0x00000070;
                        var92 = sp + 0x00000044;
                        ((int *) sp)[7] = var473;
                        var190 = sp + 0x00000098;
                        var474 = ((int *) var464)[3];
                        ((int *) sp)[9] = var474;
                        sub_318F0 (var88, "flash0:/vsh/resource/netplay_plugin.rco");
                        var428 = var189;
                        var429 = 0x00004000;
                        goto label487;
                      goto label785;
                      goto label797;
                      case 15:
                      case 28:
                      case 31:
                        var479 = scePaf_A78805B0 (0x000391C0);
                        if (var479 == 0x00000000)
                        {
                          var533 = sp;
                          scePaf_5A693901 (var533);
                          var536 = sp;
                          sub_318F0 (var536, 0x000391C0);
                          var311 = sp + 0x0000000C;
                          sub_318F0 (var311, "topmenu_plugin");
                          var321 = sp + 0x00000028;
                          sub_318F0 (var321, "flash0:/vsh/resource/game_plugin.rco");
                          var543 = sp + 0x00000070;
                          var324 = sp + 0x00000044;
                          ((int *) sp)[15] = 0x00020000;
                          var544 = sp + 0x00000098;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var543, "action");
                          var549 = sub_31824 (var324, var543);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var549)[0] = 0x00000000;
                          ((int *) var549)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var549 + 0x00000008), var544);
                          sub_317D8 (var544);
                          sub_317D8 (var543);
                          var556 = sp + 0x00000050;
                          sub_318F0 (var556, "flash0:/vsh/module/game_plugin.prx");
                          ((int *) sp)[25] = 0x0000000C;
                          ((int *) sp)[23] = 0x00000001;
                          ((int *) sp)[24] = 0x00000001;
                          if (var1 == 0x0000001C)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var543, "targetapp");
                            var618 = sub_31824 (var324, var543);
                            var606 = var618 + 0x00000008;
                            var607 = var544;
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var618)[0] = 0x00000000;
                            ((int *) var618)[1] = 0x00000000;

                          label366:
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 (var606, var607);
                            sub_317D8 (var544);
                            sub_317D8 (var543);
                          }
                          else
                          {
                            if (var1 == 0x0000001F)
                            {
                              ((int *) sp)[28] = 0x00000000;
                              ((int *) sp)[29] = 0x00000000;
                              sub_318F0 (var543, "targetapp");
                              var605 = sub_31824 (var324, var543);
                              ((int *) sp)[36] = 0x00000000;
                              var606 = var605 + 0x00000008;
                              var607 = var544;
                              ((int *) sp)[37] = 0x00000001;
                              ((int *) sp)[39] = 0x00000000;
                              ((int *) var605)[0] = 0x00000000;
                              ((int *) var605)[1] = 0x00000001;
                              goto label366;
                            }
                            else
                            {
                            }
                          }
                          var559 = *((int *) 0x00047B20);
                          var560 = ((unsigned char *) var559)[358];
                          if (var560 != 0x00000000)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var543, "SwitchPlugin_Ptr");
                            var565 = sub_31824 (var324, var543);
                            var566 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var567 = var566 + 0x0000017C;
                            ((int *) sp)[37] = var567;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var565)[0] = 0x00000000;
                            ((int *) var565)[1] = var567;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var565 + 0x00000008), var544);
                            sub_317D8 (var544);
                            sub_317D8 (var543);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var543, "SwitchPlugin_Size");
                            var578 = sub_31824 (var324, var543);
                            var579 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var580 = ((int *) var579)[351];
                            ((int *) var578)[0] = 0x00000000;
                            ((int *) sp)[37] = var580;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var578)[1] = var580;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var578 + 0x00000008), var544);
                            sub_317D8 (var544);
                            sub_317D8 (var543);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var543, "action");
                            var591 = sub_31824 (var324, var543);
                            var592 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var593 = ((int *) var592)[94];
                            ((int *) var591)[0] = 0x00000000;
                            ((int *) sp)[37] = var593;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var591)[1] = var593;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var591 + 0x00000008), var544);
                            sub_317D8 (var544);
                            sub_317D8 (var543);
                            var600 = *((int *) 0x00047B20);
                            ((char *) var600)[358] = 0x00000000;
                          }
                          if (((((var2 ^ 0x00000002) < 0x00000001)) | (((var2 ^ 0x00000006) < 0x00000001))) != 0x00000000)
                          {
                            goto label566;
                          }
                          else
                          {
                            if (((((var2 ^ 0x00000007) < 0x00000001)) | (((var2 ^ 0x00000008) < 0x00000001))) != 0x00000000)
                            {
                              goto label567;
                            }
                            else
                            {
                            }
                          }
                          goto label568;
                        }
                        else
                        {
                          if (var2 == 0x00000002)
                          {

                          label419:
                            goto label758;
                          }
                          else
                          {
                            if (((var2 < 0x00000003)) == 0x00000000)
                            {
                              if (var2 != 0x00000006)
                              {
                              }
                              else
                              {
                                goto label419;
                              }
                              goto label786;
                            }
                            else
                            {
                              if (var2 < 0)
                                goto label786;
                              var482 = scePaf_4E87FDFC (var479, 0x00000001);
                              var483 = var482;
                              if (var482 == 0x00000000)
                                goto label797;
                              var486 = sceUmdUser_87533940 ();
                              if (var486 != 0x00000000)
                                goto label797;
                              if (var2 == 0x00000000)
                              {
                                var515 = *((int *) 0x00047B20);
                                var516 = ((int *) var515)[883];
                                var517 = ((int *) var516)[4];
                                var520 var521 = (*var517) (0x0000000E, var515);
                                var522 = *((int *) 0x00047B20);
                                var523 = 0x43480000;
                                __asm__ ("mtc1       $at, $fpr12;"
                                  : 
                                  : "=r"(0x43480000));
                                var524 = ((int *) var522)[882];
                                var525 = ((int *) var524)[21];
                                var528 var529 = (*var525) (0x00000000, var522);
                                var530 = *((int *) 0x00047B20);
                                ((char *) var530)[353] = 0x00000001;
                                sub_1758C (0x00000001);
                                var505 = ((int *) var483)[1];

                              label444:
                                var508 var509 = (*var505) ();
                                var510 = *((int *) 0x00047B20);
                                sub_21F88 (var510, 0x00000000);
                                var513 = *((int *) 0x00047B20);
                                var514 = ((int *) var513)[48];
                                ((char *) var513)[357] = 0x00000000;
                                ((int *) var513)[48] = ((var514 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
                              }
                              else
                              {
                                if (var2 != 0x00000001)
                                {
                                  goto label797;
                                }
                                else
                                {
                                  var487 = *((int *) 0x00047B20);
                                  var488 = ((int *) var487)[883];
                                  var489 = ((int *) var488)[4];
                                  var492 var493 = (*var489) (0x0000000E, var487);
                                  var494 = *((int *) 0x00047B20);
                                  var495 = 0x43480000;
                                  __asm__ ("mtc1       $at, $fpr12;"
                                    : 
                                    : "=r"(0x43480000));
                                  var496 = ((int *) var494)[882];
                                  var497 = ((int *) var496)[21];
                                  var500 var501 = (*var497) (0x00000000, var494);
                                  var502 = *((int *) 0x00047B20);
                                  ((char *) var502)[353] = var2;
                                  sub_1758C (0x00000001);
                                  var505 = ((int *) var483)[2];
                                  goto label444;
                                }
                              }
                            }
                          }
                        }
                        goto label799;
                      case 16:
                      case 20:
                      case 22:
                      case 26:
                      case 29:
                        var619 = "htmlviewer_plugin";
                        var622 = scePaf_A78805B0 (0x00039104);
                        if (var622 != 0x00000000)
                        {

                        label207:
                          var753 = scePaf_A78805B0 (var619);
                          if (!(var753 == 0x00000000))
                          {
                            var756 = scePaf_4E87FDFC (var753, 0x00000001);
                            if (!(var756 == 0x00000000))
                            {
                              var757 = ((int *) var756)[0];
                              var760 var761 = (*var757) (var2);
                              var762 = *((int *) 0x00047B20);
                              var763 = 0x43480000;
                              __asm__ ("mtc1       $at, $fpr12;"
                                : 
                                : "=r"(0x43480000));
                              var764 = ((int *) var762)[652];
                              ((char *) var762)[357] = 0x00000000;
                              var765 = ((int *) var764)[206];
                              var766 = ((int *) var764)[216];
                              var767 = ((int *) (var766 + (var765 << 0x00000002)))[0];
                              scePaf_676BAC3B (var767);
                            }
                            var770 = *((int *) 0x00047B20);
                            sub_21F88 (var770, 0x00000000);
                            var773 = *((int *) 0x00047B20);
                            goto label774;
                          }
                          goto label785;
                        }
                        else
                        {
                          var623 = *((int *) 0x00047B20);
                          var624 = sp;
                          var311 = sp + 0x0000000C;
                          var625 = ((int *) (var27 + var623))[0];
                          scePaf_5A693901 (var624);
                          var628 = sp;
                          sub_318F0 (var628, 0x00039104);
                          sub_318F0 (var311, "topmenu_plugin");
                          var633 = ((int *) var625)[0];
                          var321 = sp + 0x00000028;
                          ((int *) sp)[6] = var633;
                          var634 = ((int *) var625)[1];
                          var635 = sp + 0x00000070;
                          var324 = sp + 0x00000044;
                          ((int *) sp)[7] = var634;
                          var636 = sp + 0x00000098;
                          var637 = ((int *) var625)[2];
                          ((int *) sp)[8] = var637;
                          var638 = ((int *) var625)[3];
                          ((int *) sp)[9] = var638;
                          sub_318F0 (var321, "flash0:/vsh/resource/htmlviewer_plugin.rco");
                          ((int *) sp)[15] = 0x00010000;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var635, "action");
                          var645 = sub_31824 (var324, var635);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var645)[0] = 0x00000000;
                          ((int *) var645)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var645 + 0x00000008), var636);
                          sub_317D8 (var636);
                          sub_317D8 (var635);
                          ((int *) sp)[25] = 0x0000000C;
                          if (var1 == 0x0000001A)
                          {
                            *((int *) 0x00047B04) = 0x00000003;
                            *((int *) 0x00047B10) = 0x00000001;
                            *((int *) 0x00047B08) = 0x00000200;
                            *((int *) 0x00047B14) = 0x00000000;
                            *((int *) 0x00047B18) = 0x00000000;
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "action");
                            var695 = sub_31824 (var324, var635);
                            ((int *) sp)[37] = 0x00000003;
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var695)[0] = 0x00000000;
                            ((int *) var695)[1] = 0x00000003;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var695 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "auto_disconnect");
                            var706 = sub_31824 (var324, var635);
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var706)[0] = 0x00000000;
                            ((int *) var706)[1] = 0x00000000;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var706 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "ui_level");
                            var717 = sub_31824 (var324, var635);
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var717)[0] = 0x00000000;
                            ((int *) var717)[1] = 0x00000000;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var717 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "http_app_header");
                            var728 = sub_31824 (var324, var635);
                            var729 = var728;
                            ((int *) sp)[36] = 0x00000002;
                            ((int *) sp)[38] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            sub_318F0 (var636, "PlayStation Spot");
                            var732 = ((int *) sp)[36];
                            ((int *) var729)[0] = var732;
                            var733 = ((int *) sp)[37];
                            ((int *) var729)[1] = var733;
                            sub_31940 ((var729 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "temp_config");
                            var744 = sub_31824 (var324, var635);
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x00047B04;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var744)[0] = 0x00000000;
                            ((int *) var744)[1] = 0x00047B04;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var744 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                          }
                          else
                          {
                          }
                          if (var1 == 0x00000016)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "action");
                            var684 = sub_31824 (var324, var635);
                            ((int *) sp)[37] = 0x00000002;
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var684)[0] = 0x00000000;
                            ((int *) var684)[1] = 0x00000002;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var684 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                          }
                          else
                          {
                          }
                          var652 = *((int *) 0x00047B20);
                          var653 = ((unsigned char *) var652)[358];
                          if (var653 == 0x00000000)
                          {
                          }
                          else
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "SwitchPlugin_Ptr");
                            var658 = sub_31824 (var324, var635);
                            var659 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var660 = var659 + 0x0000017C;
                            ((int *) sp)[37] = var660;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var658)[0] = 0x00000000;
                            ((int *) var658)[1] = var660;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var658 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_318F0 (var635, "SwitchPlugin_Size");
                            var671 = sub_31824 (var324, var635);
                            var672 = *((int *) 0x00047B20);
                            ((int *) sp)[36] = 0x00000000;
                            var673 = ((int *) var672)[351];
                            ((int *) var671)[0] = 0x00000000;
                            ((int *) sp)[37] = var673;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var671)[1] = var673;
                            ((int *) sp)[38] = 0x00000000;
                            sub_31940 ((var671 + 0x00000008), var636);
                            sub_317D8 (var636);
                            sub_317D8 (var635);
                            var408 = *((int *) 0x00047B20);
                            goto label565;
                          }
                          goto label567;
                        }
                        goto label786;
                      goto label785;
                      case 18:
                        var619 = "lftv_plugin";
                        var776 = scePaf_A78805B0 (0x00039020);
                        if (!(var776 == 0x00000000))
                          goto label207;
                        var777 = *((int *) 0x00047B20);
                        var778 = sp;
                        var779 = ((int *) var777)[18];

                      label195:
                        scePaf_5A693901 (var778);
                        var782 = sp;
                        sub_318F0 (var782, var619);
                        var85 = sp + 0x0000000C;
                        sub_318F0 (var85, "topmenu_plugin");
                        var787 = ((int *) var779)[0];
                        var88 = sp + 0x00000028;
                        ((int *) sp)[6] = var787;
                        var788 = ((int *) var779)[3];
                        var189 = sp + 0x00000070;
                        var92 = sp + 0x00000044;
                        ((int *) sp)[9] = var788;
                        var190 = sp + 0x00000098;
                        var789 = ((int *) var779)[1];
                        ((int *) sp)[7] = var789;
                        var790 = ((int *) var779)[2];
                        ((int *) sp)[8] = var790;
                        sub_318F0 (var88, "flash0:/vsh/resource/common_page.rco");
                        ((int *) sp)[15] = 0x00000000;
                        goto label590;
                      case 19:
                        var795 = scePaf_A78805B0 (0x0003902C);
                        if (var795 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var796 = *((int *) 0x00047B20);
                          var797 = sp;
                          var85 = sp + 0x0000000C;
                          var798 = ((int *) var796)[19];
                          scePaf_5A693901 (var797);
                          var801 = sp;
                          sub_318F0 (var801, 0x0003902C);
                          sub_318F0 (var85, "topmenu_plugin");
                          var806 = ((int *) var798)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var806;
                          var807 = ((int *) var798)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var807;
                          var190 = sp + 0x00000098;
                          var808 = ((int *) var798)[2];
                          ((int *) sp)[8] = var808;
                          var809 = ((int *) var798)[3];
                          ((int *) sp)[9] = var809;
                          sub_318F0 (var88, "flash0:/vsh/resource/camera_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var189, 0x00038E70);
                          var816 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var816)[0] = 0x00000000;
                          ((int *) var816)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var816 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var823 = *((int *) 0x00047B20);
                          var824 = 0x0000000F;

                        label186:
                          var825 = ((unsigned char *) var823)[358];
                          var826 = 0x00100000;
                          ((int *) sp)[25] = var824;

                        label187:
                          ((int *) sp)[15] = var826;

                        label188:
                          if (var825 == 0x00000000)
                          {
                          }
                          else
                          {
                            goto label650;
                          }
                          goto label744;
                        }
                        goto label786;
                      case 21:
                        var829 = scePaf_A78805B0 (0x00039064);
                        if (var829 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var830 = *((int *) 0x00047B20);
                          var831 = sp;
                          var85 = sp + 0x0000000C;
                          var832 = ((int *) var830)[21];
                          scePaf_5A693901 (var831);
                          var835 = sp;
                          sub_318F0 (var835, 0x00039064);
                          sub_318F0 (var85, "topmenu_plugin");
                          var840 = ((int *) var832)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var840;
                          var841 = ((int *) var832)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var841;
                          var190 = sp + 0x00000098;
                          var842 = ((int *) var832)[3];
                          ((int *) sp)[9] = var842;
                          sub_318F0 (var88, "flash0:/vsh/resource/premo_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var189, 0x00038E70);
                          var849 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var849)[0] = 0x00000000;
                          ((int *) var849)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var849 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var856 = *((int *) 0x00047B20);
                          var825 = ((unsigned char *) var856)[358];
                          ((int *) sp)[25] = 0x0000000F;
                          ((int *) sp)[15] = 0x00014000;
                          goto label188;
                        }
                        goto label786;
                      goto label785;
                      case 24:
                        var619 = "skype_plugin";
                        var859 = scePaf_A78805B0 (0x0003909C);
                        if (var859 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var860 = *((int *) 0x00047B20);
                          var861 = sp;
                          var779 = ((int *) var860)[24];
                          goto label195;
                        }
                        goto label786;
                      case 25:
                        var864 = scePaf_A78805B0 (0x000390AC);
                        if (var864 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var865 = *((int *) 0x00047B20);
                          var866 = sp;
                          var85 = sp + 0x0000000C;
                          var867 = ((int *) var865)[25];
                          scePaf_5A693901 (var866);
                          var870 = sp;
                          sub_318F0 (var870, 0x000390AC);
                          sub_318F0 (var85, "topmenu_plugin");
                          var875 = ((int *) var867)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var875;
                          var876 = ((int *) var867)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var876;
                          var190 = sp + 0x00000098;
                          var877 = ((int *) var867)[2];
                          ((int *) sp)[8] = var877;
                          var878 = ((int *) var867)[3];
                          ((int *) sp)[9] = var878;
                          sub_318F0 (var88, "flash0:/vsh/resource/common_page.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var189, 0x00038E70);
                          var885 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var885)[0] = 0x00000000;
                          ((int *) var885)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var885 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var823 = *((int *) 0x00047B20);
                          var824 = 0x0000000C;
                          goto label186;
                        }
                        goto label786;
                      case 27:
                        var894 = scePaf_A78805B0 (0x000390C4);
                        if (var894 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var895 = *((int *) 0x00047B20);
                          var896 = sp;
                          var85 = sp + 0x0000000C;
                          var897 = ((int *) var895)[27];
                          scePaf_5A693901 (var896);
                          var900 = sp;
                          sub_318F0 (var900, 0x000390C4);
                          sub_318F0 (var85, "topmenu_plugin");
                          var905 = ((int *) var897)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var905;
                          var906 = ((int *) var897)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var906;
                          var190 = sp + 0x00000098;
                          var907 = ((int *) var897)[2];
                          ((int *) sp)[8] = var907;
                          var908 = ((int *) var897)[3];
                          ((int *) sp)[9] = var908;
                          sub_318F0 (var88, "flash0:/vsh/resource/radioshack_plugin.rco");
                          ((int *) sp)[15] = 0x000FA000;
                          var428 = var189;
                          goto label488;
                        }
                        goto label786;
                      case 30:
                        var913 = scePaf_A78805B0 (0x00039190);
                        if (var913 != 0x00000000)
                        {
                          goto label758;
                        }
                        else
                        {
                          var914 = *((int *) 0x00047B20);
                          var915 = sp;
                          var85 = sp + 0x0000000C;
                          var916 = ((int *) var914)[30];
                          scePaf_5A693901 (var915);
                          var919 = sp;
                          sub_318F0 (var919, 0x00039190);
                          sub_318F0 (var85, "topmenu_plugin");
                          var924 = ((int *) var916)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var924;
                          var925 = ((int *) var916)[1];
                          var189 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var925;
                          var190 = sp + 0x00000098;
                          var926 = ((int *) var916)[2];
                          ((int *) sp)[8] = var926;
                          var927 = ((int *) var916)[3];
                          ((int *) sp)[9] = var927;
                          sub_318F0 (var88, "flash0:/vsh/resource/psn_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_318F0 (var189, 0x00038E70);
                          var934 = sub_31824 (var92, var189);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var934)[0] = 0x00000000;
                          ((int *) var934)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_31940 ((var934 + 0x00000008), var190);
                          sub_317D8 (var190);
                          sub_317D8 (var189);
                          var941 = *((int *) 0x00047B20);
                          ((int *) sp)[25] = 0x0000000C;
                          var825 = ((unsigned char *) var941)[358];
                          var826 = 0x00001000;
                          goto label187;
                        }
                        goto label786;
                      goto label785;
                      }
                    }
                  }
                  else
                  {
                    goto label797;
                  }
                }
                else
                {
                  if (var1 == 0x00000009)
                  {
                    if ((var4 | (((var2 ^ 0x00000005) < 0x00000001))) != 0x00000000)
                    {
                      goto label68;
                    }
                    else
                    {

                    label47:
                      if (var1 == 0x00000007)
                      {
                        if ((((var2 + 0xFFFFFFFD) < 0x00000003)) != 0x00000000)
                        {
                          goto label68;
                        }
                        else
                        {
                          var5 = var1 ^ 0x0000000F;

                        label53:
                          var6 = (var5 < 0x00000001);
                          if (!((var6 & var4) == 0x00000000))
                            goto label67;
                          if (var1 == 0x00000005)
                          {

                          label64:
                            var943 = *((int *) 0x00047B20);
                            var944 = ((int *) var943)[882];
                            var945 = ((int *) var944)[36];
                            var12 var948 = (*var945) (var4, var6, arg3, arg4, arg5, arg6, arg7, arg8);
                            var14 = ((int *) var943)[55];
                            goto label71;
                          }
                          else
                          {
                            if (var1 == 0x00000006)
                            {
                              if ((((var2 + 0xFFFFFFFE) < 0x00000002)) != 0x00000000)
                                goto label64;
                              var942 = var1 ^ 0x0000000A;

                            label60:
                              if ((((var942 < 0x00000001)) & var4) != 0x00000000)
                                goto label64;
                              if ((var6 & (((var2 ^ 0x00000002) < 0x00000001))) == 0x00000000)
                              {
                                var26 = (var1 < 0x00000021);
                                goto label73;
                              }
                              else
                              {
                                goto label64;
                              }
                            }
                            else
                            {
                              var942 = var1 ^ 0x0000000A;
                              goto label60;
                            }
                          }
                        }
                      }
                      else
                      {
                        var5 = var1 ^ 0x0000000F;
                        goto label53;
                      }
                    }
                  }
                  else
                  {
                    goto label47;
                  }
                }
              }
              else
              {
                goto label797;
              }
            }
            else
            {
              var3 = var1 ^ 0x00000006;
              goto label39;
            }
          }
          else
          {
            var960 = sceVshBridge_2EB0812A ();
            if (var960 != 0x00000002)
            {
              goto label797;
            }
            else
            {
              goto label31;
            }
          }
        }
        else
        {
          goto label31;
        }
      }
      else
      {
        var969 = sceVshBridge_2EB0812A ();
        if (var969 != 0x00000002)
        {
          goto label797;
        }
        else
        {
          goto label16;
        }
      }
    }
  }
  else
  {
    goto label16;
  }

label800:
  var17 = ((int *) sp)[56];
  var18 = ((int *) sp)[55];
  var19 = ((int *) sp)[54];
  var20 = ((int *) sp)[53];
  var21 = ((int *) sp)[52];
  var22 = ((int *) sp)[51];
  var23 = ((int *) sp)[50];
  var24 = ((int *) sp)[49];
  var25 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x00014E44
 */
int sub_14E44 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[3] = ra;
  var1 = arg1;
  var2 = 0xFFFFFC13;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (!(((arg1 < 0x00000021)) == 0x00000000))
  {
    var3 = *((int *) 0x00047B20);
    var4 = arg1 << 0x00000002;
    var5 = ((int *) (var4 + var3))[0];
    var2 = 0x00000000;
    if (!(var5 != 0x00000000))
    {
      var6 = arg1 + 0xFFFFFFFB;
      if (((var6 < 0x0000001B)) == 0x00000000)
      {
        var41 = var4 + var1;

      label38:
        var42 = (var41 << 0x00000003) + 0x000423BC;
        var43 = ((char *) var42)[0];
        var2 = 0x00000000;
        if (!(var43 == 0x00000000))
        {
          var44 = *((int *) 0x00047B20);
          var47 = sub_0CB0C (var42);
          ((int *) (var4 + var44))[0] = var47;

        label67:
          var16 = *((int *) 0x00047B20);
          var17 = ((int *) (var4 + var16))[0];
          var2 = (var17) ? 0x00000000 : 0xFFFFFC09;
        }
      }
      else
      {
        var7 = ((int *) ((var6 << 0x00000002) + 0x00042098))[0];
        switch () {
        case 0:
          var8 = *((int *) 0x00047B20);
          var11 = sub_0CB0C ("launcher_plugin");
          ((int *) (var4 + var8))[0] = var11;
          if (!(var11 != 0x00000000))
          {
            var12 = *((int *) 0x00047B20);
            var13 = ((int *) var12)[6];
            var14 = var4 + var12;
            ((int *) var14)[0] = var13;
            if (!(var13 != 0x00000000))
            {
              var15 = ((int *) var12)[8];

            label66:
              ((int *) var14)[0] = var15;
            }
          }
          goto label67;
        case 1:
          var21 = *((int *) 0x00047B20);
          var24 = sub_0CB0C ("launcher_plugin");
          ((int *) (var4 + var21))[0] = var24;
          if (!(var24 != 0x00000000))
          {
            var25 = *((int *) 0x00047B20);
            var26 = ((int *) var25)[8];

          label59:
            var14 = var4 + var25;
            ((int *) var14)[0] = var26;
            if (!(var26 != 0x00000000))
            {
              var15 = ((int *) var25)[5];
              goto label66;
            }
          }
          goto label67;
        case 2:
          var27 = *((int *) 0x00047B20);
          var30 = sub_0CB0C ("video_plugin");
          ((int *) (var4 + var27))[0] = var30;
          if (!(var30 != 0x00000000))
          {
            var31 = *((int *) 0x00047B20);
            var32 = ((int *) var31)[9];

          label54:
            ((int *) (var4 + var31))[0] = var32;
          }
          goto label67;
        case 3:
          var33 = *((int *) 0x00047B20);
          var36 = sub_0CB0C ("launcher_plugin");
          ((int *) (var4 + var33))[0] = var36;
          if (!(var36 != 0x00000000))
          {
            var25 = *((int *) 0x00047B20);
            var26 = ((int *) var25)[6];
            goto label59;
          }
          goto label67;
        case 4:
          var37 = *((int *) 0x00047B20);
          var40 = sub_0CB0C ("video_plugin");
          ((int *) (var4 + var37))[0] = var40;
          if (!(var40 != 0x00000000))
          {
            var31 = *((int *) 0x00047B20);
            var32 = ((int *) var31)[7];
            goto label54;
          }
          goto label67;
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 18:
        case 19:
        case 20:
        case 21:
        case 22:
        case 25:
          var41 = var4 + var1;
          goto label38;
        case 10:
          var48 = *((int *) 0x00047B20);
          var51 = sub_0CB0C ("game_plugin");
          ((int *) (var4 + var48))[0] = var51;
          if (!(var51 != 0x00000000))
          {
            var52 = *((int *) 0x00047B20);
            var53 = ((int *) var52)[28];

          label35:
            var14 = var4 + var52;
            ((int *) var14)[0] = var53;
            if (!(var53 != 0x00000000))
            {
              var15 = ((int *) var52)[31];
              goto label66;
            }
          }
          goto label67;
        case 11:
          var54 = *((int *) 0x00047B20);
          var57 = sub_0CB0C ("htmlviewer_plugin");
          ((int *) (var4 + var54))[0] = var57;
          if (!(var57 != 0x00000000))
          {
            var58 = *((int *) 0x00047B20);
            var59 = ((int *) var58)[22];

          label29:
            var14 = var4 + var58;
            ((int *) var14)[0] = var59;
            if (!(var59 != 0x00000000))
            {
              var15 = ((int *) var58)[29];
              goto label66;
            }
          }
          goto label67;
        case 17:
          var60 = *((int *) 0x00047B20);
          var63 = sub_0CB0C ("htmlviewer_plugin");
          ((int *) (var4 + var60))[0] = var63;
          if (!(var63 != 0x00000000))
          {
            var58 = *((int *) 0x00047B20);
            var59 = ((int *) var58)[16];
            goto label29;
          }
          goto label67;
        case 23:
          var64 = *((int *) 0x00047B20);
          var67 = sub_0CB0C ("game_plugin");
          ((int *) (var4 + var64))[0] = var67;
          if (!(var67 != 0x00000000))
          {
            var52 = *((int *) 0x00047B20);
            var53 = ((int *) var52)[15];
            goto label35;
          }
          goto label67;
        case 24:
          var68 = *((int *) 0x00047B20);
          var71 = sub_0CB0C ("htmlviewer_plugin");
          ((int *) (var4 + var68))[0] = var71;
          if (!(var71 != 0x00000000))
          {
            var72 = *((int *) 0x00047B20);
            var73 = ((int *) var72)[16];
            var14 = var4 + var72;
            ((int *) var14)[0] = var73;
            if (!(var73 != 0x00000000))
            {
              var15 = ((int *) var72)[22];
              goto label66;
            }
          }
          goto label67;
        case 26:
          var74 = *((int *) 0x00047B20);
          var77 = sub_0CB0C ("game_plugin");
          ((int *) (var4 + var74))[0] = var77;
          if (!(var77 != 0x00000000))
          {
            var78 = *((int *) 0x00047B20);
            var79 = ((int *) var78)[15];
            var14 = var4 + var78;
            ((int *) var14)[0] = var79;
            if (!(var79 != 0x00000000))
            {
              var15 = ((int *) var78)[28];
              goto label66;
            }
          }
          goto label67;
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x00015138
 */
void sub_15138 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = 0xFFFFFC13;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  if (!(((arg1 < 0x00000021)) == 0x00000000))
  {
    var3 = *((int *) 0x00047B20);
    var4 = var1 << 0x00000002;
    var5 = ((int *) (var4 + var3))[0];
    var2 = 0x00000000;
    if (!(var5 == 0x00000000))
    {
      var6 = ((var4 + var1) << 0x00000003) + 0x000423BC;
      var7 = ((char *) var6)[0];
      if (var7 != 0x00000000)
      {
        sub_0CFB4 (var6);
        var3 = *((int *) 0x00047B20);
      }
      if (((((var1 ^ 0x00000009) < 0x00000001)) | (((var1 ^ 0x00000007) < 0x00000001))) == 0x00000000)
      {
        if (((((var1 ^ 0x00000006) < 0x00000001)) | (((var1 ^ 0x00000008) < 0x00000001))) != 0x00000000)
        {
          ((int *) var3)[5] = 0x00000000;

        label14:
          ((int *) var3)[8] = 0x00000000;
          ((int *) var3)[6] = 0x00000000;
        }
        else
        {
          if (var1 == 0x00000005)
          {
            ((int *) var3)[5] = 0x00000000;
            goto label14;
          }
          else
          {
            if (((((var1 ^ 0x00000010) < 0x00000001)) | (((var1 ^ 0x00000016) < 0x00000001))) != 0x00000000)
            {
              ((int *) var3)[29] = 0x00000000;

            label19:
              ((int *) var3)[16] = 0x00000000;
              ((int *) var3)[22] = 0x00000000;
            }
            else
            {
              if (var1 == 0x0000001D)
              {
                ((int *) var3)[29] = 0x00000000;
                goto label19;
              }
              else
              {
                if (((((var1 ^ 0x0000000F) < 0x00000001)) | (((var1 ^ 0x0000001C) < 0x00000001))) != 0x00000000)
                {
                  ((int *) var3)[31] = 0x00000000;

                label25:
                  ((int *) var3)[15] = 0x00000000;
                  ((int *) var3)[28] = 0x00000000;
                }
                else
                {
                  if (var1 == 0x0000001F)
                  {
                    ((int *) var3)[31] = 0x00000000;
                    goto label25;
                  }
                  else
                  {
                    ((int *) (var4 + var3))[0] = 0x00000000;
                  }
                }
              }
            }
          }
        }
      }
      else
      {
        ((int *) var3)[9] = 0x00000000;
        ((int *) var3)[7] = 0x00000000;
      }
      var2 = 0x00000000;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015290
 */
void sub_15290 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  sub_21F88 (var1, 0x00000000);
  var4 = *((int *) 0x00047B20);
  var7 = sub_21E8C (var4, 0x00000000);
  var8 = *((int *) 0x00047B20);
  var9 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  var10 = ((int *) var8)[48];
  var11 = ((unsigned char *) var8)[272];
  ((int *) var8)[48] = ((var10 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
  if (var11 == 0x00000000)
  {
    var20 = ((int *) var8)[652];
    ((char *) var8)[357] = 0x00000000;
    var21 = ((int *) var20)[206];
    var22 = ((int *) var20)[216];
    var23 = ((int *) (var22 + (var21 << 0x00000002)))[0];
    scePaf_676BAC3B (var23);
    var8 = *((int *) 0x00047B20);
  }
  var12 = ((int *) var8)[93];
  if (!(var12 <= 0))
  {
    ((int *) var8)[93] = 0xFFFFFFFF;
    sub_18F80 ();
    sub_199EC ();
  }
  sub_199EC ();
  ra = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015338
 */
void sub_15338 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[882];
  var3 = ((int *) var2)[35];
  var4 = arg1;
  var7 var8 = (*var3) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var9 = ((int *) var1)[54];
  if (var9 == var7)
  {
    if (var4 == 0x00000000)
    {

    label34:
      sub_154E0 ();
    }
    else
    {
      var17 = scePaf_4E87FDFC (var4, 0x00000001);
      var18 = var17;
      if (var17 == 0x00000000)
        goto label34;
      var21 = sceUmdUser_87533940 ();
      var22 = *((int *) 0x00047B20);
      if (var21 != 0x00000000)
        goto label34;
      var23 = ((int *) var22)[59];
      if (var23 == 0x00000000)
      {
        var51 = ((int *) var22)[883];
        var52 = ((int *) var51)[4];
        var55 var56 = (*var52) (0x0000000E);
        var57 = *((int *) 0x00047B20);
        var58 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        var59 = ((int *) var57)[882];
        var60 = ((int *) var59)[21];
        var63 var64 = (*var60) (0x00000000, var57);
        var65 = *((int *) 0x00047B20);
        ((char *) var65)[353] = 0x00000001;
        sub_1758C (0x00000001);
        var41 = ((int *) var18)[1];

      label29:
        var44 var45 = (*var41) ();
        var46 = *((int *) 0x00047B20);
        sub_21F88 (var46, 0x00000000);
        var49 = *((int *) 0x00047B20);
        var50 = ((int *) var49)[48];
        ((char *) var49)[357] = 0x00000000;
        ((int *) var49)[48] = ((var50 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
      }
      else
      {
        if (var23 != 0x00000001)
          goto label34;
        var24 = ((int *) var22)[883];
        var25 = ((int *) var24)[4];
        var28 var29 = (*var25) (0x0000000E);
        var30 = *((int *) 0x00047B20);
        var31 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        var32 = ((int *) var30)[882];
        var33 = ((int *) var32)[21];
        var36 var37 = (*var33) (0x00000000, var30);
        var38 = *((int *) 0x00047B20);
        ((char *) var38)[353] = var23;
        sub_1758C (0x00000001);
        var41 = ((int *) var18)[2];
        goto label29;
      }
    }
  }
  else
  goto label34;
  ra = ((int *) sp)[3];
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015480
 */
void sub_15480 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  var4 = sub_21E8C (var1, 0x00000001);
  var5 = *((int *) 0x00047B20);
  sub_21F88 (var5, 0x00000001);
  var8 = *((int *) 0x00047B20);
  var9 = ((int *) var8)[652];
  var12 = scePaf_ED055C3C (var9, 0x0000006F);
  var13 = *((int *) 0x00047B20);
  var14 = ((int *) var13)[48];
  ((char *) var13)[272] = 0x00000000;
  ((int *) var13)[48] = (var14 | 0x00000200);
  sub_199D4 ();
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000154E0
 */
void sub_154E0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  sub_21F88 (var1, 0x00000000);
  var4 = *((int *) 0x00047B20);
  var7 = sub_21E8C (var4, 0x00000000);
  var8 = *((int *) 0x00047B20);
  var9 = ((int *) var8)[48];
  ((char *) var8)[272] = 0x00000001;
  ((int *) var8)[48] = ((var9 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
  sub_1F9DC (var8, 0x00000009);
  var12 = *((int *) 0x00047B20);
  var13 = ((int *) var12)[48];
  ((int *) var12)[48] = (var13 | 0x00000020);
  sub_22CF0 (var12);
  sub_16644 (0x00000001);
  var20 = sceVshBridge_4A596D2D (0x00008000, 0x00000001);
  var21 = *((int *) 0x00047B20);
  var22 = ((int *) var21)[93];
  if (!(var22 <= 0))
  {
    sub_18F68 ();
    sub_18F80 ();
    sub_199EC ();
  }
  sub_199EC ();
  ra = ((int *) sp)[1];
  var31 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001559C
 */
void sub_1559C ()
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[29] = s1;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[34] = ra;
  ((int *) sp)[33] = s5;
  var2 = sp + 0x0000000C;
  ((int *) sp)[32] = s4;
  var3 = sp + 0x00000028;
  ((int *) sp)[31] = s3;
  var4 = sp + 0x00000050;
  ((int *) sp)[30] = s2;
  ((int *) sp)[28] = s0;
  var7 = sub_21E8C (var1, 0x00000001);
  var8 = *((int *) 0x00047B20);
  ((char *) var8)[273] = 0x00000001;
  var11 = scePaf_A78805B0 (0x00039224);
  var12 = var11;
  var13 = sp;
  if (var11 == 0x00000000)
  {
    scePaf_5A693901 (var13);
    var29 = sp;
    sub_318F0 (var29, 0x00039224);
    sub_318F0 (var2, "topmenu_plugin");
    sub_318F0 (var3, "flash0:/vsh/resource/auth_plugin.rco");
    ((int *) sp)[14] = 0x00000030;
    sub_318F0 (var4, "flash0:/vsh/module/auth_plugin.prx");
    var38 = sp;
    ((int *) sp)[24] = 0x00000001;
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[23] = 0x00000001;
    scePaf_36C437F1 (var38, 0x000156DC);
    sub_317D8 (var4);
    var43 = sp + 0x00000044;
    sub_31808 (var43);
    sub_317D8 (var3);
    sub_317D8 (var2);
    var50 = sp;
    sub_317D8 (var50);
    ra = ((int *) sp)[34];
  }
  else
  {
    var14 = *((int *) 0x00047B20);
    var17 = sub_21E8C (var14, 0x00000000);
    var18 = ((int *) var12)[110];
    scePaf_2CFAF8C4 (var12, var18);
    ra = ((int *) sp)[34];
  }
  var21 = ((int *) sp)[33];
  var22 = ((int *) sp)[32];
  var23 = ((int *) sp)[31];
  var24 = ((int *) sp)[30];
  var25 = ((int *) sp)[29];
  var26 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x000156DC
 */
void sub_156DC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = *((int *) 0x00047B20);
  ((int *) sp)[2] = ra;
  var5 = sub_21E8C (var2, 0x00000000);
  if (var1 == 0x00000000)
  {

  label19:
    ra = ((int *) sp)[2];
  }
  else
  {
    var8 = scePaf_4E87FDFC (var1, 0x00000001);
    if (!(var8 == 0x00000000))
    {
      var9 = *((int *) 0x00047B20);
      var10 = ((int *) var9)[48];
      ((int *) var9)[48] = (var10 | 0x00000004);
      sub_22C20 (var9);
      var13 = ((int *) var8)[3];
      var16 var17 = (*var13) (0x00000000, 0x00015794, 0x00000000, 0x00000000);
    }
    var20 = sub_18B68 ();
    var21 = *((int *) 0x00047B20);
    var22 = ((int *) var21)[882];
    var23 = ((int *) var22)[35];
    var26 var27 = (*var23) ();
    ra = ((int *) sp)[2];
    if (!(var20 == var26))
    {
      var28 = *((int *) 0x00047B20);
      sub_1F744 (var28);
      goto label19;
    }
  }
  var31 = ((int *) sp)[1];
  var32 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015794
 */
void sub_15794 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  ((char *) var2)[273] = 0x00000000;
  if (var1 == 0x00000000)
  {
    var11 = sub_21720 (var2);
    var12 = *((int *) 0x00047B20);
    sub_21798 (var12, var11);
    var15 = *((int *) 0x00047B20);
    var16 = ((int *) var15)[48];
    ((int *) var15)[48] = (var16 | 0x00000030);
    sub_22AC4 (var15);
    var19 = *((int *) 0x00047B20);
    sub_22CF0 (var19);
    var22 = *((int *) 0x00047B20);
    var23 = ((int *) var22)[53];
    var24 = ((int *) var22)[52];
    sub_12674 (var24, var23);
    ra = ((int *) sp)[1];
  }
  else
  {
    if (var1 < 0)
    {

    label18:
      if (((var1 >> 16) & 0x00000FFF) != 0x00000008)
      {

      label24:
        ra = ((int *) sp)[1];
      }
      else
      {
        vsh_E5463CE5 (0x00000001);
        ra = ((int *) sp)[1];
      }
    }
    else
    {
      if (((var1 < 0x00000003)) == 0x00000000)
      {
        goto label18;
      }
      else
      {
        var3 = *((int *) 0x00047B20);
        sub_1F804 (var3);
        goto label24;
      }
    }
  }
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001584C
 */
int sub_1584C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = arg1;
  var2 = 0x00000000;
  if (arg1 == 0x00000001)
  {

  label24:
    ra = ((int *) sp)[0];
  }
  else
  {
    var3 = *((int *) 0x00047B20);
    var4 = ((int *) var3)[61];
    var5 = var4 + 0xFFFFFFFB;
    if (var4 == arg1)
      goto label24;
    if (((var5 < 0x00000019)) == 0x00000000)
    {
      var14 = *((int *) 0x00047B20);

    label14:
      var15 = ((int *) var14)[61];
      var16 = (((var15 << 0x00000002) + var15) << 0x00000003) + 0x000423BC;
      var17 = ((char *) var16)[0];
      ra = ((int *) sp)[0];
      if (!(var17 == 0x00000000))
      {

      label21:
        var13 = scePaf_A78805B0 ("launcher_plugin");
        var2 = var13;
        goto label24;
      }
    }
    else
    {
      var6 = *((int *) 0x00047B20);
      var7 = ((int *) ((var5 << 0x00000002) + 0x00042104))[0];
      switch () {
      case 0:
        var8 = var1 ^ 0x00000008;
        var9 = var1 ^ 0x00000006;

      label18:
        var10 = ((var9 < 0x00000001)) | ((var8 < 0x00000001));

      label19:

      label20:
        if (var10 == 0x00000000)
          goto label21;
        goto label24;
      case 1:
        var8 = var1 ^ 0x00000008;
        var9 = var1 ^ 0x00000005;
        goto label18;
      case 2:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 12:
      case 13:
      case 14:
      case 15:
      case 16:
      case 18:
      case 19:
      case 20:
      case 21:
      case 22:
      case 23:
        var14 = *((int *) 0x00047B20);
        goto label14;
      case 3:
        var10 = ((var1 + 0xFFFFFFFB) < 0x00000002);
        goto label19;
      case 11:
        var18 = var1 ^ 0x0000001D;
        var19 = var1 ^ 0x00000016;

      label11:
        var10 = ((var19 < 0x00000001)) | ((var18 < 0x00000001));
        goto label20;
      case 17:
        var18 = var1 ^ 0x0000001D;

      label9:
        var19 = var1 ^ 0x00000010;
        goto label11;
      case 24:
        var18 = var1 ^ 0x00000016;
        goto label9;
      }
    }
  }
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x00015964
 */
int sub_15964 (int arg1)
{
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) ((arg1 << 0x00000002) + var1))[0];
  var3 = 0xFFFFFFFF;
  if (!(var2 != 0x00000000))
  {
    if (!(((((arg1 ^ 0x0000000E) < 0x00000001)) | (((arg1 ^ 0x00000001) < 0x00000001))) != 0x00000000))
    {
      if (((((arg1 ^ 0x00000007) < 0x00000001)) | (((arg1 ^ 0x00000009) < 0x00000001))) == 0x00000000)
      {
        if (((((arg1 ^ 0x00000008) < 0x00000001)) | (((arg1 ^ 0x00000006) < 0x00000001))) != 0x00000000)
        {
          var11 = ((int *) var1)[8];

        label10:
          if (!(var11 != 0x00000000))
          {
            var12 = ((int *) var1)[6];
            if (!(var12 != 0x00000000))
            {
              var5 = ((int *) var1)[5];

            label22:
              if (!(var5 != 0x00000000))
              {
                var6 = *((int *) 0x00047B20);

              label24:
                var7 = 0x00000000;
                var8 = ((int *) var6)[0];
                while (1) {
                  var6 = var6 + 0x00000004;
                  if (var8 != 0x00000000)
                  {
                    var3 = var7;
                  }
                  else
                  {
                    var7 = var7 + 0x00000001;
                    if (!(((var7 < 0x00000021)) != 0x00000000))
                      break;
                    var8 = ((int *) var6)[0];
                    continue;
                  }
                }
              }
            }
          }
        }
        else
        {
          if (arg1 == 0x00000005)
          {
            var11 = ((int *) var1)[8];
            goto label10;
          }
          else
          {
            if (((((arg1 ^ 0x00000016) < 0x00000001)) | (((arg1 ^ 0x00000010) < 0x00000001))) != 0x00000000)
            {
              var9 = ((int *) var1)[22];

            label17:
              if (!(var9 != 0x00000000))
              {
                var10 = ((int *) var1)[16];
                if (!(var10 != 0x00000000))
                {
                  var5 = ((int *) var1)[29];
                  goto label22;
                }
              }
            }
            else
            {
              var6 = *((int *) 0x00047B20);
              if (arg1 != 0x0000001D)
                goto label24;
              var9 = ((int *) var1)[22];
              goto label17;
            }
          }
        }
      }
      else
      {
        var4 = ((int *) var1)[7];
        if (!(var4 != 0x00000000))
        {
          var5 = ((int *) var1)[9];
          goto label22;
        }
      }
    }
  }
  return var3;
}

/**
 * Subroutine at address 0x00015A8C
 */
void sub_15A8C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((unsigned char *) var1)[353];
  var3 = arg1;
  if (var2 != 0x00000000)
  {

  label108:
    ra = ((int *) sp)[3];

  label109:
    var5 = ((int *) sp)[2];
  }
  else
  {
    var4 = ((unsigned short *) arg1)[2];
    if (var4 == 0x00000409)
    {
      var71 = ((int *) arg1)[4];
      var72 = ((int *) arg1)[3];
      if (var72 == var71)
        goto label108;
      if (var72 == 0x00000001)
        goto label108;
      if (((var72 < 0x00000002)) != 0x00000000)
      {
        ra = ((int *) sp)[3];
        if (!(var72 != 0x00000000))
        {
          var91 = ((int *) var1)[47];
          var92 = ((int *) var1)[48];
          ((int *) var1)[47] = (var91 | 0x00000040);
          ((int *) var1)[48] = (var92 | 0x00000002);
          sub_16FA0 (0x00000003);
          var95 = *((int *) 0x00047B20);
          var96 = ((unsigned char *) var95)[356];
          if (var96 == 0x00000000)
          {
            ((char *) var95)[285] = 0x00000000;
            sub_1CA08 (var95);
            var109 = *((int *) 0x00047B20);
            ((char *) var109)[354] = 0x00000000;
          }
          else
          {
            var97 = ((unsigned char *) var95)[354];
            ((char *) var95)[285] = 0x00000001;
            if (var97 == 0x00000000)
            {
              sub_1CA08 (var95);
              var106 = *((int *) 0x00047B20);
              ((char *) var106)[354] = 0x00000001;
            }
            else
            {
              ((char *) var95)[354] = 0x00000000;
            }
          }
          var98 = *((int *) 0x00047B20);
          sub_1DC8C (var98);
          var101 = *((int *) 0x00047B20);
          sub_22BF0 (var101);
          ra = ((int *) sp)[3];
        }
      }
      else
      {
        if (var72 == 0x00000002)
        {
          var75 = ((int *) var1)[882];
          var76 = ((int *) var75)[36];
          var79 var80 = (*var76) (var72, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
          ((int *) var1)[654] = var79;
          var81 = *((int *) 0x00047B20);
          sub_1D820 (var81);
          sub_170AC (0xFFFFFFFF, 0xFFFFFFFF);
          var86 = *((int *) 0x00047B20);
          var87 = ((unsigned char *) var86)[272];
          if (var87 != 0x00000000)
          {

          label38:
            sub_16DF0 (0x00000003, 0x00000000);
            ra = ((int *) sp)[3];
          }
          else
          {
            var88 = ((unsigned char *) var86)[357];
            if (var88 == 0x00000000)
            {
              ra = ((int *) sp)[3];
            }
            else
            {
              goto label38;
            }
          }
        }
        else
        {
          if (var72 != 0x00000003)
          {
            ra = ((int *) sp)[3];
          }
          else
          {
            sub_1F2D8 (var1, 0x0000000D);
            ra = ((int *) sp)[3];
          }
        }
      }
      goto label109;
    }
    else
    {
      if (((var4 < 0x0000040A)) == 0x00000000)
      {
        ra = ((int *) sp)[3];
        if (var4 != 0x0000040A)
          goto label109;
        var58 = ((int *) var1)[882];
        var59 = ((int *) var58)[90];
        var62 var63 = (*var59) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        ra = ((int *) sp)[3];
        if (var62 == 0x00000000)
          goto label109;
        var64 = ((int *) var3)[4];
        var65 = ((int *) var3)[3];
        if (var65 == var64)
          goto label109;
        if (var65 != 0x00000001)
        {
          var5 = ((int *) sp)[2];
        }
        else
        {
          if (var64 != 0x00000000)
          {
            var5 = ((int *) sp)[2];
          }
          else
          {
            var66 = *((int *) 0x00047B20);
            var67 = ((unsigned char *) var66)[356];
            var5 = ((int *) sp)[2];
            if (!(var67 != 0x00000000))
            {
              var68 = 0x43480000;
              __asm__ ("mtc1       $at, $fpr12;"
                : 
                : "=r"(0x43480000));
              sub_197B4 (0x00000002, 0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000001);
              ra = ((int *) sp)[3];
              goto label109;
            }
          }
        }
      }
      else
      {
        if (var4 == 0x00000408)
        {
          var8 = ((int *) arg1)[3];
          var9 = ((int *) arg1)[4];
          if (var8 == var9)
          {
          }
          else
          {
            var10 = *((int *) 0x00047B20);
            if (((var8 < 0x00000009)) == 0x00000000)
            {

            label69:
              var52 = ((unsigned char *) var10)[188];
              if (((var52 ^ 0x00000001) & 0x00000001) == 0x00000000)
              {
                var54 = ((int *) var10)[48];
              }
              else
              {
                var53 = ((int *) var10)[47];
                ((int *) var10)[47] = (var53 | 0x00000010);
                var54 = ((int *) var10)[48];
              }
              ((int *) var10)[48] = (var54 | 0x00000100);
              var55 = ((int *) var3)[3];
              ((int *) var10)[663] = var55;
              sub_16DF0 (0x00000001, 0x00000000);
              var38 = *((int *) 0x00047B20);
            }
            else
            {
              var11 = ((int *) ((var8 << 0x00000002) + 0x00042168))[0];
              switch () {
              case 0:
                var12 = *((int *) 0x00047B20);
                var13 = ((int *) var12)[47];
                var14 = ((int *) var12)[48];
                var15 = ((unsigned char *) var12)[356];
                ((int *) var12)[47] = (var13 | 0x00000020);
                ((int *) var12)[48] = (var14 | 0x00000001);
                if (var15 == 0x00000000)
                {
                  ((char *) var12)[284] = 0x00000001;
                  sub_1CA08 (var12);
                  var47 = *((int *) 0x00047B20);
                  ((char *) var47)[354] = 0x00000000;
                }
                else
                {
                  var16 = ((unsigned char *) var12)[354];
                  if (var16 == 0x00000000)
                  {
                    sub_1CA08 (var12);
                    var44 = *((int *) 0x00047B20);
                    ((char *) var44)[354] = 0x00000001;
                  }
                  else
                  {
                    ((char *) var12)[354] = 0x00000000;
                  }
                }
                sub_16FA0 (0x00000001);
                sub_16FA0 (0x00000000);
                sub_16FA0 (0x00000004);
                var23 = *((int *) 0x00047B20);
                var24 = ((int *) var23)[652];
                var27 = scePaf_ED055C3C (var24, 0x0000006F);
                var28 = *((int *) 0x00047B20);
                sub_1D0D0 (var28);
                var31 = *((int *) 0x00047B20);
                sub_22BA4 (var31);
                var34 = *((int *) 0x00047B20);
                var37 = sub_208AC (var34);
                if (var37 != 0x00000000)
                {
                  sub_1758C (0x00000000);
                  var38 = *((int *) 0x00047B20);
                }
                else
                {
                case 1:

                label106:
                  var38 = *((int *) 0x00047B20);
                }
              goto label106;
              case 2:
              case 4:
                var48 = *((int *) 0x00047B20);
                var49 = 0x00000002;

              label76:
                sub_1F2D8 (var48, var49);
                var38 = *((int *) 0x00047B20);
                goto label107;
              case 3:
              case 5:
              case 6:
              case 7:
                var10 = *((int *) 0x00047B20);
                goto label69;
              case 8:
                var48 = *((int *) 0x00047B20);
                var49 = 0x00000003;
                goto label76;
              }
            }

          label107:
            var39 = ((int *) var38)[47];
            ((int *) var38)[47] = (((var39 | 0x00000100) & 0xFFFFFFFE) | (0x00000000 & 0x00000001));
          }
        }
        goto label108;
      }
    }
  }
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015E10
 */
int sub_15E10 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  var2 = arg2;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s2;
  var5 = scePaf_407C762E (arg1);
  var6 = 0xFFFFFC17;
  if (!(var5 != 0x00000000))
  {
    var7 = *((int *) 0x00047B20);
    ((int *) sp)[0] = 0x00000000;
    var10 = sub_1F9A4 (var7, 0x00000002);
    var11 = *((int *) 0x00047B20);
    if (var10 != 0x00000000)
    {

    label26:
      var19 = scePaf_407C762E (var1);
      var6 = 0xFFFFFC17;
      if (!(var19 != 0x00000000))
      {
        var20 = *((int *) 0x00047B20);
        var23 = sub_1F9A4 (var20, 0x00000002);
        var24 = *((int *) 0x00047B20);
        if (var23 != 0x00000000)
        {

        label41:
          var30 = scePaf_407C762E (var1);
          var6 = !(var30) ? 0x00000000 : 0xFFFFFC17;
        }
        else
        {
          var27 = sub_21B88 (var24, 0x00000002, var2);
          if (!(var27 != 0x00000000))
            goto label41;
          var36 = scePaf_407C762E (var1);
          var6 = 0xFFFFFC17;
          if (!(var36 != 0x00000000))
          {
            var37 = *((int *) 0x00047B20);
            sub_21CD4 (var37, 0x00000002);
            goto label41;
          }
        }
      }
    }
    else
    {
      var12 = sp;
      var15 = sub_213B0 (var11, 0x00000002, var2, var12);
      if (var15 != 0x00000000)
      {
        var46 = ((int *) sp)[0];
        var49 = scePaf_407C762E (var1);
        var6 = 0xFFFFFC17;
        if (!(var49 != 0x00000000))
        {
          var50 = *((int *) 0x00047B20);
          var51 = sp;
          var2 = 0xFFFFFFFF;
          var54 = sub_213B0 (var50, 0x00000002, 0xFFFFFFFF, var51);
          var16 = ((int *) sp)[0];

        label19:
          if (!(((0x000F9FFF < (var16 + 0xFFFFFFFF))) != 0x00000000))
            goto label26;
          var42 = scePaf_407C762E (var1);
          var6 = 0xFFFFFC17;
          if (!(var42 != 0x00000000))
          {
            var43 = *((int *) 0x00047B20);
            sub_21CD4 (var43, 0x00000002);
            goto label26;
          }
        }
      }
      else
      {
        var16 = ((int *) sp)[0];
        goto label19;
      }
    }
  }
  ra = ((int *) sp)[7];
  var31 = ((int *) sp)[6];
  var32 = ((int *) sp)[5];
  var33 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x00015F64
 */
void sub_15F64 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg2;
  ((int *) sp)[15] = ra;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  var4 = scePaf_407C762E (arg2);
  var5 = 0xFFFFFC17;
  if (!(var4 != 0x00000000))
  {
    var6 = *((int *) 0x00047B20);
    sub_218D4 (var6);
    var11 = scePaf_2338483F ();
    var12 = *((int *) 0x00047B20);
    ((int *) sp)[8] = 0x00000000;
    var13 = ((int *) var11)[38];
    var14 = ((int *) var12)[51];
    if ((var14 & 0x00000010) == 0x00000000)
    {
      var23 = sub_1F9A4 (var12, 0x00000004);
      if (var23 == 0x00000000)
      {
        var237 = *((int *) 0x00047B20);
        var238 = *((int *) 0x00047B20);
        var239 = sp + 0x00000020;
        ((int *) sp)[4] = var13;
        var242 = sub_213B0 (var238, 0x00000004, var13, var239);
        if (var242 == 0xFFFFFC0C)
        {
          var252 = ((int *) sp)[8];
          var255 = scePaf_407C762E (var1);
          var5 = 0xFFFFFC17;
          if (!(var255 != 0x00000000))
          {
            var256 = *((int *) 0x00047B20);
            var257 = sp + 0x00000020;
            ((int *) sp)[4] = 0xFFFFFFFF;
            var260 = sub_213B0 (var256, 0x00000004, 0xFFFFFFFF, var257);
            var243 = ((int *) sp)[8];

          label25:
            var244 = *((int *) 0x00047B20);
            if (((0x0007CFFF < (var243 + 0xFFFFFFFF))) != 0x00000000)
            {
              var251 = scePaf_407C762E (var1);
              var5 = 0xFFFFFC17;
              if (!(var251 != 0x00000000))
              {
                var244 = *((int *) 0x00047B20);
                var246 = 0x00000004;

              label31:
                sub_21CD4 (var244, var246);

              label36:
                var30 = scePaf_407C762E (var1);
                var5 = 0xFFFFFC17;
                if (!(var30 != 0x00000000))
                {
                  var31 = *((int *) 0x00047B20);
                  var34 = sub_1F9A4 (var31, 0x00000005);
                  var35 = *((int *) 0x00047B20);
                  if (var34 != 0x00000000)
                  {

                  label61:
                    var53 = scePaf_407C762E (var1);
                    var5 = 0xFFFFFC17;
                    if (!(var53 != 0x00000000))
                    {
                      var54 = *((int *) 0x00047B20);
                      var57 = sub_1F9A4 (var54, 0x00000002);
                      var58 = *((int *) 0x00047B20);
                      if (var57 != 0x00000000)
                      {

                      label85:
                        var66 = scePaf_407C762E (var1);
                        var5 = 0xFFFFFC17;
                        if (!(var66 != 0x00000000))
                        {
                          var67 = *((int *) 0x00047B20);
                          var70 = sub_1F9A4 (var67, 0x00000001);
                          var71 = *((int *) 0x00047B20);
                          if (var70 != 0x00000000)
                          {

                          label109:
                            var79 = scePaf_407C762E (var1);
                            var5 = 0xFFFFFC17;
                            if (!(var79 != 0x00000000))
                            {
                              var80 = *((int *) 0x00047B20);
                              var83 = sub_1F9A4 (var80, 0x00000000);
                              var84 = *((int *) 0x00047B20);
                              if (var83 != 0x00000000)
                              {

                              label133:
                                var92 = scePaf_407C762E (var1);
                                var5 = 0xFFFFFC17;
                                if (!(var92 != 0x00000000))
                                {
                                  var93 = *((int *) 0x00047B20);
                                  var96 = sub_1F9A4 (var93, 0x00000004);
                                  var97 = *((int *) 0x00047B20);
                                  if (var96 != 0x00000000)
                                  {

                                  label148:
                                    var104 = scePaf_407C762E (var1);
                                    var5 = 0xFFFFFC17;
                                    if (!(var104 != 0x00000000))
                                    {
                                      var105 = *((int *) 0x00047B20);
                                      var108 = sub_1F9A4 (var105, 0x00000005);
                                      var109 = *((int *) 0x00047B20);
                                      if (var108 != 0x00000000)
                                      {

                                      label163:
                                        var116 = scePaf_407C762E (var1);
                                        var5 = 0xFFFFFC17;
                                        if (!(var116 != 0x00000000))
                                        {
                                          var117 = *((int *) 0x00047B20);
                                          var120 = sub_1F9A4 (var117, 0x00000002);
                                          var121 = *((int *) 0x00047B20);
                                          if (var120 != 0x00000000)
                                          {

                                          label178:
                                            var128 = scePaf_407C762E (var1);
                                            var5 = 0xFFFFFC17;
                                            if (!(var128 != 0x00000000))
                                            {
                                              var129 = *((int *) 0x00047B20);
                                              var132 = sub_1F9A4 (var129, 0x00000001);
                                              var133 = *((int *) 0x00047B20);
                                              if (var132 != 0x00000000)
                                              {

                                              label193:
                                                var140 = scePaf_407C762E (var1);
                                                var5 = 0xFFFFFC17;
                                                if (!(var140 != 0x00000000))
                                                {
                                                  var141 = *((int *) 0x00047B20);
                                                  var144 = sub_1F9A4 (var141, 0x00000000);
                                                  var145 = *((int *) 0x00047B20);
                                                  if (var144 != 0x00000000)
                                                  {

                                                  label208:
                                                    var152 = scePaf_407C762E (var1);
                                                    var5 = !(var152) ? 0x00000000 : 0xFFFFFC17;
                                                  }
                                                  else
                                                  {
                                                    var146 = ((int *) sp)[0];
                                                    var149 = sub_21B88 (var145, 0x00000000, var146);
                                                    if (!(var149 != 0x00000000))
                                                      goto label208;
                                                    var155 = scePaf_407C762E (var1);
                                                    var5 = 0xFFFFFC17;
                                                    if (!(var155 != 0x00000000))
                                                    {
                                                      var156 = *((int *) 0x00047B20);
                                                      sub_21CD4 (var156, 0x00000000);
                                                      goto label208;
                                                    }
                                                  }
                                                }
                                              }
                                              else
                                              {
                                                var134 = ((int *) sp)[1];
                                                var137 = sub_21B88 (var133, 0x00000001, var134);
                                                if (!(var137 != 0x00000000))
                                                  goto label193;
                                                var161 = scePaf_407C762E (var1);
                                                var5 = 0xFFFFFC17;
                                                if (!(var161 != 0x00000000))
                                                {
                                                  var162 = *((int *) 0x00047B20);
                                                  sub_21CD4 (var162, 0x00000001);
                                                  goto label193;
                                                }
                                              }
                                            }
                                          }
                                          else
                                          {
                                            var122 = ((int *) sp)[2];
                                            var125 = sub_21B88 (var121, 0x00000002, var122);
                                            if (!(var125 != 0x00000000))
                                              goto label178;
                                            var167 = scePaf_407C762E (var1);
                                            var5 = 0xFFFFFC17;
                                            if (!(var167 != 0x00000000))
                                            {
                                              var168 = *((int *) 0x00047B20);
                                              sub_21CD4 (var168, 0x00000002);
                                              goto label178;
                                            }
                                          }
                                        }
                                      }
                                      else
                                      {
                                        var110 = ((int *) sp)[5];
                                        var113 = sub_21B88 (var109, 0x00000005, var110);
                                        if (!(var113 != 0x00000000))
                                          goto label163;
                                        var173 = scePaf_407C762E (var1);
                                        var5 = 0xFFFFFC17;
                                        if (!(var173 != 0x00000000))
                                        {
                                          var174 = *((int *) 0x00047B20);
                                          sub_21CD4 (var174, 0x00000005);
                                          goto label163;
                                        }
                                      }
                                    }
                                  }
                                  else
                                  {
                                    var98 = ((int *) sp)[4];
                                    var101 = sub_21B88 (var97, 0x00000004, var98);
                                    if (!(var101 != 0x00000000))
                                      goto label148;
                                    var179 = scePaf_407C762E (var1);
                                    var5 = 0xFFFFFC17;
                                    if (!(var179 != 0x00000000))
                                    {
                                      var180 = *((int *) 0x00047B20);
                                      sub_21CD4 (var180, 0x00000004);
                                      goto label148;
                                    }
                                  }
                                }
                              }
                              else
                              {
                                var85 = sp + 0x00000020;
                                ((int *) sp)[0] = var13;
                                var88 = sub_213B0 (var84, 0x00000000, var13, var85);
                                if (var88 == 0xFFFFFC0C)
                                {
                                  var189 = ((int *) sp)[8];
                                  var192 = scePaf_407C762E (var1);
                                  var5 = 0xFFFFFC17;
                                  if (!(var192 != 0x00000000))
                                  {
                                    var193 = *((int *) 0x00047B20);
                                    var194 = sp + 0x00000020;
                                    ((int *) sp)[0] = 0xFFFFFFFF;
                                    var197 = sub_213B0 (var193, 0x00000000, 0xFFFFFFFF, var194);
                                    var89 = ((int *) sp)[8];

                                  label126:
                                    if (!(((0x000F9FFF < (var89 + 0xFFFFFFFF))) != 0x00000000))
                                      goto label133;
                                    var185 = scePaf_407C762E (var1);
                                    var5 = 0xFFFFFC17;
                                    if (!(var185 != 0x00000000))
                                    {
                                      var186 = *((int *) 0x00047B20);
                                      sub_21CD4 (var186, 0x00000000);
                                      goto label133;
                                    }
                                  }
                                }
                                else
                                {
                                  var89 = ((int *) sp)[8];
                                  goto label126;
                                }
                              }
                            }
                          }
                          else
                          {
                            var72 = sp + 0x00000020;
                            ((int *) sp)[1] = var13;
                            var75 = sub_213B0 (var71, 0x00000001, var13, var72);
                            if (var75 == 0xFFFFFC0C)
                            {
                              var204 = ((int *) sp)[8];
                              var207 = scePaf_407C762E (var1);
                              var5 = 0xFFFFFC17;
                              if (!(var207 != 0x00000000))
                              {
                                var208 = *((int *) 0x00047B20);
                                var209 = sp + 0x00000020;
                                ((int *) sp)[1] = 0xFFFFFFFF;
                                var212 = sub_213B0 (var208, 0x00000001, 0xFFFFFFFF, var209);
                                var76 = ((int *) sp)[8];

                              label102:
                                if (!(((0x000F9FFF < (var76 + 0xFFFFFFFF))) != 0x00000000))
                                  goto label109;
                                var200 = scePaf_407C762E (var1);
                                var5 = 0xFFFFFC17;
                                if (!(var200 != 0x00000000))
                                {
                                  var201 = *((int *) 0x00047B20);
                                  sub_21CD4 (var201, 0x00000001);
                                  goto label109;
                                }
                              }
                            }
                            else
                            {
                              var76 = ((int *) sp)[8];
                              goto label102;
                            }
                          }
                        }
                      }
                      else
                      {
                        var59 = sp + 0x00000020;
                        ((int *) sp)[2] = var13;
                        var62 = sub_213B0 (var58, 0x00000002, var13, var59);
                        if (var62 != 0x00000000)
                        {
                          var219 = ((int *) sp)[8];
                          var222 = scePaf_407C762E (var1);
                          var5 = 0xFFFFFC17;
                          if (!(var222 != 0x00000000))
                          {
                            var223 = *((int *) 0x00047B20);
                            var224 = sp + 0x00000020;
                            ((int *) sp)[2] = 0xFFFFFFFF;
                            var227 = sub_213B0 (var223, 0x00000002, 0xFFFFFFFF, var224);
                            var63 = ((int *) sp)[8];

                          label78:
                            if (!(((0x000F9FFF < (var63 + 0xFFFFFFFF))) != 0x00000000))
                              goto label85;
                            var215 = scePaf_407C762E (var1);
                            var5 = 0xFFFFFC17;
                            if (!(var215 != 0x00000000))
                            {
                              var216 = *((int *) 0x00047B20);
                              sub_21CD4 (var216, 0x00000002);
                              goto label85;
                            }
                          }
                        }
                        else
                        {
                          var63 = ((int *) sp)[8];
                          goto label78;
                        }
                      }
                    }
                  }
                  else
                  {
                    var36 = sp + 0x00000024;
                    ((int *) sp)[9] = 0x00000000;
                    ((int *) sp)[5] = var13;
                    var39 = sub_213B0 (var35, 0x00000005, var13, var36);
                    var40 = var39;
                    if (var40 == 0xFFFFFC0C)
                    {
                      var231 = scePaf_407C762E (var1);
                      var5 = 0xFFFFFC17;
                      if (!(var231 != 0x00000000))
                      {
                        var232 = *((int *) 0x00047B20);
                        var233 = sp + 0x00000024;
                        ((int *) sp)[5] = 0xFFFFFFFF;
                        var236 = sub_213B0 (var232, 0x00000005, 0xFFFFFFFF, var233);
                        var40 = var236;

                      label51:
                        if (var40 == 0xFFFFFC0C)
                        {
                          var228 = *((int *) 0x00047B20);
                        }
                        else
                        {
                          var41 = *((int *) 0x00047B20);
                          var42 = ((int *) var41)[51];
                          ((int *) var41)[51] = (var42 | 0x00000008);
                        }
                        var43 = ((int *) sp)[9];
                        var44 = ((int *) sp)[8];
                        if (var43 == 0x00000000)
                        {

                        label56:
                          var47 = scePaf_407C762E (var1);
                          var5 = 0xFFFFFC17;
                          if (!(var47 != 0x00000000))
                          {
                            var48 = *((int *) 0x00047B20);
                            sub_21CD4 (var48, 0x00000005);
                            goto label61;
                          }
                        }
                        else
                        {
                          if (((0x0007D000 < (var44 + var43))) == 0x00000000)
                            goto label61;
                          goto label56;
                        }
                      }
                    }
                    else
                    goto label51;
                  }
                }
              }
            }
            else
            {
              var245 = ((unsigned char *) var244)[204];
              var246 = 0x00000002;
              if (!(((var245 ^ 0x00000001) & 0x00000001) == 0x00000000))
                goto label31;
              goto label36;
            }
          }
        }
        else
        {
          var243 = ((int *) sp)[8];
          goto label25;
        }
      }
      else
      {
        var24 = *((int *) 0x00047B20);
        var25 = ((int *) var24)[888];
        var26 = ((int *) var25)[3];
        if (!(var26 == 0x00000000))
        {
          var27 = ((int *) var26)[4];
          ((int *) sp)[8] = var27;
        }
        goto label36;
      }
    }
    else
    {
      var17 = sub_15E10 (var1, var13);
      var5 = var17;
    }
  }
  ra = ((int *) sp)[15];
  var18 = ((int *) sp)[14];
  var19 = ((int *) sp)[13];
  var20 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x000165B4
 */
void sub_165B4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (arg1 != 0x00000000)
  {

  label14:
    var1 = *((int *) 0x00047B20);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label14;
    var8 = *((int *) 0x00047B20);
    var11 = sub_1B1B8 (var8);
    var1 = *((int *) 0x00047B20);
    if (!(var11 == 0x00000000))
    {
      var12 = ((unsigned char *) var1)[272];
      if (!(var12 == 0x00000000))
      {
        var13 = ((unsigned char *) var1)[353];
        if (!(var13 != 0x00000000))
        {
          sub_1FA7C (var1);
          sub_1758C (0x00000001);
          var1 = *((int *) 0x00047B20);
        }
      }
    }
  }
  sub_21F88 (var1, 0x00000000);
  sub_17020 (0x00000000, ((0x00000000 < arg1)));
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016644
 */
void sub_16644 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[2] = ra;
  var2 = ((unsigned char *) var1)[272];
  if (var2 != 0x00000000)
  {
    var7 = sub_1B1B8 (var1);
    ra = ((int *) sp)[2];
    if (!(var7 == 0x00000000))
    {
      var8 = *((int *) 0x00047B20);
      var9 = ((int *) var8)[882];
      var10 = ((int *) var9)[32];
      var13 var14 = (*var10) ();
      ra = ((int *) sp)[2];
      if (!(var13 == 0x00000000))
      {
        if (!((arg1 & 0x000000FF) == 0x00000000))
        {
          var15 = *((int *) 0x00047B20);
          var16 = ((int *) var15)[652];
          var19 = scePaf_B18293CA (var16, 0x0000006F);
          var20 = 0x447A0000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x447A0000));
          if ((var19 & 0x000000FF) != 0x00000000)
          {

          label16:
            ra = ((int *) sp)[2];
          }
          else
          {
            var21 = *((int *) 0x00047B20);
            var22 = ((int *) var21)[652];
            scePaf_DE0E0F8B (var22, 0x0000006F, 0x00016788, 0x00000000);
            ra = ((int *) sp)[2];
          }
        }
      }
    }
  }
  else
  goto label16;
  var3 = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000166F4
 */
void sub_166F4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((unsigned char *) var1)[272];
  ra = ((int *) sp)[1];
  if (var2 != 0x00000000)
  {
    var6 = sub_1B1B8 (var1);
    ra = ((int *) sp)[1];
    if (!(var6 == 0x00000000))
    {
      var7 = *((int *) 0x00047B20);
      var8 = ((int *) var7)[882];
      var9 = ((int *) var8)[32];
      var12 var13 = (*var9) ();
      ra = ((int *) sp)[1];
      if (!(var12 == 0x00000000))
      {
        var14 = *((int *) 0x00047B20);
        var17 = sub_208AC (var14);
        if (var17 != 0x00000000)
        {
          ra = ((int *) sp)[1];
        }
        else
        {
          var18 = *((int *) 0x00047B20);
          var19 = ((int *) var18)[61];
          sub_15138 (var19);
          var22 = *((int *) 0x00047B20);
          ((int *) var22)[62] = 0x00000001;
          sub_16DF0 (0x00000000, 0x00000000);
          ra = ((int *) sp)[1];
        }
      }
    }
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016788
 */
void sub_16788 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[62];
  if (var2 == 0x00000001)
  {
    var23 = "radioshack_plugin";
    var26 = scePaf_A78805B0 (0x000390C4);
    if (var26 != 0x00000000)
    {

    label11:
      scePaf_3A81189F (var23, 0x000166F4);
      ra = ((int *) sp)[2];
    }
    else
    {
      var23 = "htmlviewer_plugin";
      var29 = scePaf_A78805B0 (0x00039104);
      if (var29 == 0x00000000)
      {
        var3 = *((int *) 0x00047B20);

      label15:
        var4 = ((unsigned char *) var3)[272];
        ra = ((int *) sp)[2];
        if (var4 != 0x00000000)
        {
          var9 = sub_1B1B8 (var3);
          ra = ((int *) sp)[2];
          if (!(var9 == 0x00000000))
          {
            var10 = *((int *) 0x00047B20);
            var11 = ((int *) var10)[882];
            var12 = ((int *) var11)[32];
            var15 var16 = (*var12) ();
            ra = ((int *) sp)[2];
            if (!(var15 == 0x00000000))
            {
              var17 = *((int *) 0x00047B20);
              var20 = sub_208AC (var17);
              if (var20 != 0x00000000)
              {
                ra = ((int *) sp)[2];
              }
              else
              {
                sub_16DF0 (0x00000000, 0x00000000);
                ra = ((int *) sp)[2];
              }
            }
          }
        }
      }
      else
      {
        goto label11;
      }
    }
  }
  else
  {
    var3 = *((int *) 0x00047B20);
    goto label15;
  }
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016864
 */
void sub_16864 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_407C762E (arg2);
  var4 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var5 = *((int *) 0x00047B20);
    sub_20B44 (var5, (var5 + 0x00000A54));
    var10 = scePaf_407C762E (arg2);
    var4 = !(var10) ? 0x00000000 : 0xFFFFFC17;
  }
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000168B8
 */
void sub_168B8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var3 = scePaf_407C762E (arg2);
  var4 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var5 = *((int *) 0x00047B20);
    var6 = ((int *) var5)[882];
    var7 = ((int *) var6)[33];
    var10 var11 = (*var7) (0xFFFFFC17);
    var4 = 0xFFFFFC0E;
    if (!(var10 != 0x00000002))
    {
      var12 = *((int *) 0x00047B20);
      sub_2186C (var12);
      var17 = scePaf_407C762E (arg2);
      var4 = !(var17) ? 0x00000000 : 0xFFFFFC17;
    }
  }
  ra = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016930
 */
void sub_16930 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (arg1 != 0x00000000)
  {

  label14:
    var1 = *((int *) 0x00047B20);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label14;
    var8 = *((int *) 0x00047B20);
    sub_1CAA8 (var8);
    sub_170AC (0xFFFFFFFF, 0xFFFFFFFF);
    var15 = sub_18F50 ();
    if (var15 != 0x00000000)
      goto label14;
    var16 = *((int *) 0x00047B20);
    sub_1C12C (var16);
    var1 = *((int *) 0x00047B20);
  }
  sub_21F88 (var1, 0x00000000);
  sub_17020 (0x00000001, ((0x00000000 < arg1)));
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000169B4
 */
void sub_169B4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg1 != 0x00000000)
  {

  label7:
    var2 = (0x00000000 < var1);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label7;
    var6 = *((int *) 0x00047B20);
    sub_1D820 (var6);
    var2 = (0x00000000 < var1);
  }
  sub_17020 (0x00000002, var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000169FC
 */
void sub_169FC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg1 != 0x00000000)
  {

  label7:
    var2 = (0x00000000 < var1);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label7;
    var6 = *((int *) 0x00047B20);
    ((char *) var6)[2640] = 0x00000001;
    sub_1E78C (var6);
    var2 = (0x00000000 < var1);
  }
  sub_17020 (0x00000003, var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016A4C
 */
void sub_16A4C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var3 = scePaf_407C762E (arg2);
  var4 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var7 = sub_0E734 ();
    var10 = scePaf_407C762E (arg2);
    var4 = !(var10) ? var7 : 0xFFFFFC17;
  }
  ra = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016AA4
 */
void sub_16AA4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  var2 = *((int *) 0x00047B20);
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  var3 = arg4;
  var6 = sub_21E8C (var2, 0x00000000);
  var7 = *((int *) 0x00047B20);
  sub_21F88 (var7, 0x00000000);
  var10 = (0x00000000 < var1);
  if (!(var1 != 0x00000000))
  {
    if (((var3 < 0x0000000A)) == 0x00000000)
    {
    case 2:
    case 6:
    case 7:
    case 8:

    label22:
      var21 = *((int *) 0x00047B20);
      var22 = 0x00000000;

    label23:
      sub_1F2D8 (var21, var22);
    case 1:

    label25:
      var10 = (0x00000000 < var1);
    }
    else
    {
      var11 = ((int *) ((var3 << 0x00000002) + 0x0004218C))[0];
      switch () {
      case 0:
        sub_12674 (0x0000000F, 0x00000000);
        var10 = (0x00000000 < var1);
        goto label29;
      goto label25;
      goto label22;
      case 3:
        var25 = *((int *) 0x00047B20);
        var26 = ((int *) var25)[669];
        var29 = sub_1C918 (var25, var26);
        if (var29 == 0x00000000)
        {
          var21 = *((int *) 0x00047B20);
          var22 = 0x00000008;
        }
        else
        {
          var21 = *((int *) 0x00047B20);
          var22 = 0x00000004;
        }
        goto label23;
      case 4:
        var21 = *((int *) 0x00047B20);
        var22 = 0x00000001;
        goto label23;
      case 5:
        var30 = *((int *) 0x00047B20);
        ((int *) var30)[52] = 0x0000000F;
        ((int *) var30)[53] = 0x00000000;
        sub_1559C ();
        var10 = (0x00000000 < var1);
        goto label29;
      goto label22;
      goto label22;
      goto label22;
      case 9:
        vsh_E5463CE5 (0x00000002);
        var10 = (0x00000000 < var1);
        goto label29;
      }
    }
  }

label29:
  sub_17020 (0x00000004, var10);
  sub_199EC ();
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016BBC
 */
void sub_16BBC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[58];
  var5 = sub_14E44 (var2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016BEC
 */
void sub_16BEC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  sub_17020 (0x00000005, ((0x00000000 < arg1)));
  ra = ((int *) sp)[2];
  if (!(arg1 != 0x00000000))
  {
    if (arg4 != 0x00000000)
    {
      sub_154E0 ();
      ra = ((int *) sp)[2];
    }
    else
    {
      var3 = *((int *) 0x00047B20);
      var4 = ((int *) var3)[59];
      var5 = ((int *) var3)[58];
      sub_12FD4 (var5, var4);
      ra = ((int *) sp)[2];
    }
  }
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016C54
 */
void sub_16C54 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  var2 = *((int *) 0x00047B20);
  while (1) {
    var3 = ((int *) ((var1 << 0x00000002) + var2))[0];
    if (var3 != 0x00000000)
      break;
    var1 = var1 + 0x00000001;
    if (((var1 < 0x00000021)) != 0x00000000)
    {
      var2 = *((int *) 0x00047B20);
      continue;
    }
    else
    {
      var4 = *((int *) 0x00047B20);
      ra = ((int *) sp)[0];
    }
    goto label10;
  }
  sub_15138 (var1);
  ra = ((int *) sp)[0];

label10:
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016CAC
 */
void sub_16CAC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_17020 (0x00000006, ((0x00000000 < arg1)));
  sub_12A48 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016CD8
 */
void sub_16CD8 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sceVshCommonUtil_B3F4BEA8 (var1, 0x00000000);
  var4 = *((int *) 0x00047B20);
  var5 = ((int *) var4)[892];
  sub_23450 (var5);
  var8 = sp;
  sceVshCommonUtil_B5C86FBB (var8);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00016D14
 */
void sub_16D14 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  sub_1A6BC (var1);
  var4 = *((int *) 0x00047B20);
  var5 = ((int *) var4)[892];
  sub_23040 (var5);
  var8 = *((int *) 0x00047B1C);
  scePaf_3C8DD7F0 (var8, "page_topmenu");
  var13 = scePaf_AB9A6186 (0x00000000, 0x00016D84, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00016DA4);
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016D84
 */
void sub_16D84 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_17CA4 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016DA4
 */
void sub_16DA4 ()
{
  sp = sp + 0xFFFFFFF0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[0] = ra;
  var2 = 0x4184CCCD;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x4184CCCD));
  var3 = ((int *) var1)[47];
  var4 = ((int *) var1)[652];
  ((int *) var1)[47] = (var3 | 0x00000009);
  scePaf_485890F9 (var4, 0x00000077, 0x000113A0, var4);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016DF0
 */
void sub_16DF0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (((arg1 < 0x00000007)) != 0x00000000)
  {
    sub_16FA0 (arg1);
    var8 = *((int *) 0x00047B20);
    var9 = var1 << 0x00000003;
    var10 = ((int *) (var9 + var8))[33];
    ra = ((int *) sp)[4];
    if (!(var10 != 0x00000000))
    {
      var11 = ((int *) ((var1 << 0x00000002) + 0x000421B4))[0];
      switch () {
      case 0:
        var12 = *((int *) 0x00047B20);
        sub_21F88 (var12, 0x00000001);
        var15 = *((int *) 0x00047B20);
        var16 = var9 + var15;

      label24:

      label25:
        var19 = scePaf_AB9A6186 (0x00000000, 0x00015F64, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x000165B4);
        var20 = *((int *) 0x00047B20);
        ((int *) (var16 + 0x00000080))[1] = var19;
        var21 = ((int *) var20)[891];
        ((int *) var20)[891] = (var21 + 0x00000001);

      label28:
        ra = ((int *) sp)[4];
        goto label29;
      case 1:
        var22 = *((int *) 0x00047B20);
        sub_21F88 (var22, 0x00000001);
        var25 = *((int *) 0x00047B20);
        var16 = var9 + var25;
        goto label24;
      case 2:
        var26 = *((int *) 0x00047B20);
        var16 = var9 + var26;
        goto label24;
      case 3:
        var27 = *((int *) 0x00047B20);
        var16 = var9 + var27;
        goto label24;
      case 4:
        var28 = *((int *) 0x00047B20);
        var31 = sub_21E8C (var28, 0x00000001);
        var32 = *((int *) 0x00047B20);
        sub_21F88 (var32, 0x00000001);
        sub_16FA0 (0x00000000);
        var37 = *((int *) 0x00047B20);
        var16 = var9 + var37;
        goto label24;
      case 5:
        var38 = *((int *) 0x00047B20);
        var16 = var9 + var38;
        goto label24;
      case 6:
        var39 = *((int *) 0x00047B20);
        var16 = var9 + var39;
        goto label25;
      }
    }
  }
  else
  goto label28;

label29:
  var2 = ((int *) sp)[3];
  var3 = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00016FA0
 */
void sub_16FA0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 << 0x00000003;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  if (!(((arg1 < 0x00000007)) == 0x00000000))
  {
    var2 = *((int *) 0x00047B20);
    var3 = ((int *) (var1 + var2))[33];
    if (var3 != 0x00000000)
    {
      var8 = scePaf_407C762E (var3);
      if (var8 == 0x00000000)
      {
        var10 = *((int *) 0x00047B20);
        var11 = ((int *) (var1 + var10))[33];
        scePaf_F787B3B0 (0x00000000, var11);
        var9 = *((int *) 0x00047B20);
      }
      else
      {
        var9 = *((int *) 0x00047B20);
      }
      ((int *) (var1 + var9))[33] = 0x00000000;
    }
  }
  ra = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00017020
 */
void sub_17020 (int arg1, int arg2)
{
  if (!((arg2 & 0x000000FF) != 0x00000000))
  {
    var1 = *((int *) 0x00047B20);
    ((int *) ((arg1 << 0x00000003) + var1))[33] = 0x00000000;
  }
  var2 = *((int *) 0x00047B20);
  var3 = ((int *) var2)[891];
  ((int *) var2)[891] = (var3 + 0xFFFFFFFF);
  return;
}

/**
 * Subroutine at address 0x00017050
 */
void sub_17050 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_A78805B0 ("system_plugin");
  if (!(var3 == 0x00000000))
  {
    var6 = scePaf_4E87FDFC (var3, 0x00000001);
    if (!(var6 == 0x00000000))
    {
      var7 = ((int *) var6)[86];
      var10 var11 = (*var7) (0x00000000, (arg1 & 0x000000FF));
    }
  }
  ra = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000170AC
 */
void sub_170AC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFD90;
  ((int *) sp)[147] = s3;
  ((int *) sp)[146] = s2;
  var1 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  var2 = arg1;
  ((int *) sp)[145] = s1;
  ((int *) sp)[144] = s0;
  var3 = arg2;
  ((int *) sp)[153] = ra;
  ((int *) sp)[152] = fp;
  ((int *) sp)[151] = s7;
  ((int *) sp)[150] = s6;
  ((int *) sp)[149] = s5;
  ((int *) sp)[148] = s4;
  sceVshCommonGui_FA85A7E1 (0x00038DDC);
  var6 = *((int *) 0x00047B20);
  var7 = ((unsigned char *) var6)[272];
  ra = ((int *) sp)[153];
  if (var7 == 0x00000000)
  {

  label125:
    var54 = ((int *) sp)[152];
  }
  else
  {
    var8 = ((unsigned char *) var6)[275];
    if (var8 != 0x00000000)
    {
      var54 = ((int *) sp)[152];
    }
    else
    {
      var9 = ((unsigned char *) var6)[276];
      if (var9 != 0x00000000)
      {
        var54 = ((int *) sp)[152];
      }
      else
      {
        var10 = ((unsigned char *) var6)[273];
        if (var10 != 0x00000000)
        {
          var54 = ((int *) sp)[152];
        }
        else
        {
          if ((var3 | var2) >= 0)
          {
            var13 = sub_1B68C (var6, var2, var3);
          }
          else
          {
            var13 = sub_1B644 (var6);
          }
          var14 = var13;
          if (var13 == 0x00000000)
          {

          label124:
            ra = ((int *) sp)[153];
          }
          else
          {
            var15 = *((int *) 0x00047B20);
            var16 = ((int *) var13)[4];
            var17 = ((int *) var13)[0];
            var18 = ((int *) var15)[62];
            var19 = (0x00000000 < var16);
            var20 = (0x00000000 < (var18 ^ 0x00000001));
            if (var17 == 0x00000022)
            {
              var100 = sub_19B30 (0x00000000);
              var17 = ((int *) var14)[0];
              if (!(var100 == 0x00000001))
              {
                var19 = 0x00000000;
              }
            }
            if (var17 == 0x00000027)
            {
              var97 = sub_19B30 (0x00000001);
              var19 = ((var97 ^ 0x00000001)) ? 0x00000000 : var19;
            }
            var21 = *((int *) 0x00047B20);
            if (var19 != 0x00000000)
            {

            label30:
              var22 = ((int *) var21)[651];
              var23 = 0x00000000;
              var26 = scePaf_970DC20D (var22, "msgsystem_option_with_icon");
              ((int *) sp)[133] = 0x00000000;
              var27 = var26;
              var28 = *((int *) 0x00047B20);
              ((int *) sp)[132] = 0x00000000;
              var29 = ((int *) var28)[62];
              if (((var29 < 0x00000005)) != 0x00000000)
              {
                var20 = 0x00000000;
              }
              else
              {
                if (((var29 < 0x00000007)) != 0x00000000)
                {

                label37:
                  var68 = sub_20A04 (var28, 0x00000006);
                  var69 = var68;
                  var70 = 0xFFFFFFFF;
                  if (var69 == 0x00000004)
                  {

                  label95:
                    var20 = 0x00000000;
                  }
                  else
                  {
                    if (var69 == 0x00000002)
                    {
                      goto label95;
                    }
                    else
                    {
                      if (var69 == 0x00000008)
                      {
                        var20 = 0x00000000;
                      }
                      else
                      {
                        var73 = scePaf_A78805B0 ("launcher_plugin");
                        if (var73 == 0x00000000)
                        {
                          var82 = ((int *) var14)[2];
                        }
                        else
                        {
                          var76 = scePaf_4E87FDFC (var73, 0x00000001);
                          if (var76 == 0x00000000)
                          {

                          label67:
                            var82 = ((int *) var14)[2];
                          }
                          else
                          {
                            var77 = ((int *) var76)[2];
                            var80 var81 = (*var77) ();
                            if (!(var80 != 0x00000000))
                              goto label67;
                            var89 = ((int *) var76)[1];
                            var92 var93 = (*var89) (var80);
                            var94 = var92;
                            if (var94 == 0x00000004)
                            {
                              var70 = 0x00000005;
                              goto label67;
                            }
                            else
                            {
                              if (((var94 < 0x00000005)) == 0x00000000)
                              {
                                if (var94 == 0x00000008)
                                {
                                  var70 = 0x00000008;
                                  goto label67;
                                }
                                else
                                {
                                  var82 = ((int *) var14)[2];
                                }
                              }
                              else
                              {
                                if (var94 == 0x00000002)
                                {
                                  var70 = 0x00000006;
                                  goto label67;
                                }
                                else
                                {
                                  var82 = ((int *) var14)[2];
                                }
                              }
                            }
                          }
                        }
                        if (var82 == 0x00000005)
                        {
                          if ((var69 & 0x00000004) != 0x00000000)
                          {
                            var70 = 0x00000005;

                          label82:
                          }
                          else
                          {
                          }
                        }
                        else
                        {
                          if (var82 == 0x00000006)
                          {
                            if ((var69 & 0x00000002) != 0x00000000)
                            {
                              var70 = 0x00000006;
                              goto label82;
                            }
                            else
                            {
                            }
                          }
                          else
                          {
                            if (var82 == 0x00000008)
                            {
                              var70 = ((var69 & 0x00000008)) ? var82 : var70;
                            }
                            else
                            {
                            }
                            goto label82;
                          }
                        }
                        if (var70 == 0x00000005)
                        {
                          var88 = *((int *) 0x00047B1C);

                        label92:
                          var86 = scePaf_970DC20D (var83, "msg_backto_rssch_with_icon");
                          var23 = var86;
                        }
                        else
                        {
                          if (var70 == 0x00000006)
                          {
                            var87 = *((int *) 0x00047B1C);
                            goto label92;
                          }
                          else
                          {
                            if (var70 != 0x00000008)
                            {
                              var20 = 0x00000000;
                            }
                            else
                            {
                              var83 = *((int *) 0x00047B1C);
                              goto label92;
                            }
                          }
                        }
                      }
                    }
                  }
                }
                else
                {
                  if (var29 == 0x00000008)
                    goto label37;
                  goto label95;
                }
              }
              if (var19 != 0x00000000)
              {
                if (var20 == 0x00000000)
                {

                label106:
                  var30 = sp + 0x00000010;
                  scePaf_CDDCFFB3 (var30, 0x00000100, 0x000392A8, var23);
                  var33 = sp + 0x00000230;

                label109:
                  var34 = sp + 0x00000210;
                  var35 = sp + 0x00000010;
                  ((int *) sp)[0] = 0x00000000;
                  ((int *) sp)[1] = 0x00000000;
                  ((int *) sp)[2] = 0x00000000;
                  vsh_8ECCA070 (var33, var35, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
                  sub_33668 (var34, var33);
                  sub_335E8 (var33);
                  var42 = ((int *) sp)[132];
                  sceVshCommonGui_DC4D90A3 (0x00038DDC, 0x00000000, var42, 0x00000001);
                  var45 = 0x44FA0000;
                  __asm__ ("mtc1       $at, $fpr12;"
                    : 
                    : "=r"(0x44FA0000));
                  sceVshCommonGui_0555C757 (0x00038DDC);
                  var48 = 0x453B8000;
                  __asm__ ("mtc1       $at, $fpr12;"
                    : 
                    : "=r"(0x453B8000));
                  sceVshCommonGui_38855541 (0x00038DDC);
                  var51 = var34;
                }
                else
                {
                  if (var23 == 0x00000000)
                  {

                  label105:
                    var51 = sp + 0x00000210;
                  }
                  else
                  {
                    var63 = sp + 0x00000010;
                    scePaf_CDDCFFB3 (var63, 0x00000100, 0x000392B0, var23, var27);
                    var33 = sp + 0x00000230;
                    goto label109;
                  }
                }
              }
              else
              {
                if (var20 == 0x00000000)
                  goto label105;
                if (var23 == 0x00000000)
                  goto label105;
                goto label106;
              }
              sub_335E8 (var51);
              goto label124;
            }
            else
            {
              ra = ((int *) sp)[153];
              if (!(var20 == 0x00000000))
              {
                var21 = *((int *) 0x00047B20);
                goto label30;
              }
            }
          }
          goto label125;
        }
      }
    }
  }
  var55 = ((int *) sp)[151];
  var56 = ((int *) sp)[150];
  var57 = ((int *) sp)[149];
  var58 = ((int *) sp)[148];
  var59 = ((int *) sp)[147];
  var60 = ((int *) sp)[146];
  var61 = ((int *) sp)[145];
  var62 = ((int *) sp)[144];
  sp = sp + 0x00000270;
  return;
}

/**
 * Subroutine at address 0x000174C0
 */
void sub_174C0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var4 = sub_2076C (var1);
  ra = ((int *) sp)[2];
  if (!(var4 == 0x00000000))
  {
    var5 = *((int *) 0x00047B20);
    if ((arg1 & 0x000000FF) != 0x00000000)
    {
      __asm__ ("mtc1       $zr, $fpr12;");
      var21 = ((int *) var5)[62];
      if (((((var21 + 0xFFFFFFF7) < 0x00000002)) | (((var21 ^ 0x00000007) < 0x00000001))) != 0x00000000)
      {

      label9:
        var15 = ((int *) var5)[882];
        var16 = ((int *) var15)[16];
        var19 var20 = (*var16) (0x00000000, var5);
        ra = ((int *) sp)[2];
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr12;");
        var7 = ((int *) var5)[882];

      label13:
        var8 = ((int *) var7)[17];
        var11 var12 = (*var8) (0x00000000, var5);
        ra = ((int *) sp)[2];
      }
    }
    else
    {
      __asm__ ("mtc1       $zr, $fpr12;");
      var6 = ((int *) var5)[62];
      if (((((var6 + 0xFFFFFFF7) < 0x00000002)) | (((var6 ^ 0x00000007) < 0x00000001))) != 0x00000000)
        goto label9;
      var7 = ((int *) var5)[882];
      __asm__ ("mtc1       $zr, $fpr12;");
      goto label13;
    }
  }
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001758C
 */
void sub_1758C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if ((arg1 & 0x000000FF) == 0x00000000)
  {
    sub_17050 (0x00000000);
    var14 = *((int *) 0x00047B20);
    var15 = *((int *) 0x00000000);
    if (!(var15 == 0x00000000))
    {
      *((int *) 0x00000000) = (var15 + 0xFFFFFFFF);
    }
    var16 = ((unsigned char *) var14)[276];
    ra = ((int *) sp)[0];
    if (!(var16 != 0x00000000))
    {
      var19 = vsh_1B1CE2CF ();
      if (var19 == 0x00000000)
      {
        ra = ((int *) sp)[0];
      }
      else
      {
        var9 = 0x00000001;

      label19:
        sub_174C0 (var9);
        ra = ((int *) sp)[0];
      }
    }
  }
  else
  {
    sub_17050 (0x00000001);
    var3 = *((int *) 0x00047B20);
    var4 = *((int *) 0x00000000);
    var5 = ((unsigned char *) var3)[276];
    *((int *) 0x00000000) = (var4 + 0x00000001);
    if (var5 == 0x00000000)
    {
      var8 = vsh_1B1CE2CF ();
      var9 = 0x00000000;
      if (!(var8 == 0x00000000))
        goto label19;

    label22:
      ra = ((int *) sp)[0];
    }
    else
    goto label22;
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00017640
 */
void sub_17640 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var3 = sceVshBridge_A71BF332 ();
  ra = ((int *) sp)[3];
  if (!(var3 == 0x00000000))
  {
    var4 = 0x00000000;
    var5 = 0x00000003;
    if (!((arg1 & 0x000000FF) != 0x00000000))
    {
      var4 = 0x0000000F;
      var5 = 0x00000000;
    }
    var8 = scePaf_2338483F ();
    scePaf_8DF1417C (var8, var4, var5);
    ra = ((int *) sp)[3];
  }
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000176A8
 */
void sub_176A8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (((arg1 < 0x0000000A)) == 0x00000000)
  {
  case 0:
  case 1:

  label147:
    var2 = arg1 + 0xFFFFFFF6;
    ra = ((int *) sp)[3];
    if (!(((var2 < 0x00000008)) == 0x00000000))
    {
      var3 = ((int *) ((var2 << 0x00000002) + 0x000421F8))[0];
      switch () {
      case 0:
      case 2:
      case 4:
      case 7:
        var4 = *((int *) 0x00047B20);
        var5 = ((int *) var4)[652];
        ((int *) var4)[49] = 0x00000002;
        var8 = scePaf_ED055C3C (var5, 0x0000006F);

      label153:
        var9 = 0x42C80000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x42C80000));
        sceVshCommonGui_6367CB49 ();
        var12 = *((int *) 0x00047B1C);
        scePaf_27F4E35C (var12, 0x000393F0, 0x00000000, 0x00000000);
        var15 = *((int *) 0x00047B1C);
        scePaf_3C8DD7F0 (var15, 0x000393F0);
        ra = ((int *) sp)[3];
        goto label160;
      case 1:
      case 3:
      case 5:
      case 6:
        var21 = *((int *) 0x00047B20);
        ((int *) var21)[49] = 0x00000001;
        goto label153;
      }
    }

  label160:
    var18 = ((int *) sp)[2];
  }
  else
  {
    var1 = ((int *) ((arg1 << 0x00000002) + 0x000421D0))[0];
    switch () {
    goto label147;
    goto label147;
    case 2:
      var22 = *((int *) 0x00047B20);
      var23 = ((unsigned char *) var22)[272];
      if (var23 != 0x00000000)
      {
      }
      else
      {
        ((char *) var22)[357] = 0x00000001;
      }
      ((char *) var22)[272] = 0x00000001;
      ((int *) var22)[62] = 0x00000001;
      sub_21B74 (var22);
      var26 = *((int *) 0x00047B20);
      sub_1EC0C (var26);
      var29 = *((int *) 0x00047B20);
      sub_1ECE0 (var29, 0xFFFFFFFF, 0xFFFFFFFF);
      var32 = *((int *) 0x00047B20);
      sub_1EEBC (var32);
      var35 = *((int *) 0x00047B20);
      var36 = ((unsigned char *) var35)[275];
      ra = ((int *) sp)[3];
      if (!(var36 != 0x00000000))
      {
        var37 = ((unsigned char *) var35)[273];
        if (var37 == 0x00000000)
        {
          sub_16DF0 (0x00000003, 0x00000000);
          var40 = *((int *) 0x00047B1C);
          scePaf_3C8DD7F0 (var40, "page_topmenu");
          sub_17F30 (0x0000000D);
          var45 = *((int *) 0x00047B20);
          var46 = ((int *) var45)[653];
          if (var46 == 0x00000000)
          {

          label140:
            sub_17F30 (0x00000000);
          }
          else
          {
            var47 = ((unsigned char *) var46)[48];
            if (!(var47 != 0x00000000))
              goto label140;
          }

        label143:
          sub_170AC (0xFFFFFFFF, 0xFFFFFFFF);
          ra = ((int *) sp)[3];
        }
        else
        {
        case 8:
        case 6:
        case 7:
        case 10:
        case 11:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 17:
        case 18:
        case 19:
        case 20:
        case 22:
        case 23:
        case 25:

        label146:
          ra = ((int *) sp)[3];
        }
      }
      goto label160;
    case 3:
      var52 = *((int *) 0x00047B20);
      var53 = ((int *) var52)[61];
      ((int *) var52)[62] = var53;
      sub_16DF0 (0x00000003, 0x00000000);
      sub_17F30 (0x00000000);
      sub_17F30 (0x0000000D);
      var60 = *((int *) 0x00047B1C);
      scePaf_3C8DD7F0 (var60, "page_topmenu");
      goto label143;
    case 4:
      var63 = *((int *) 0x00047B20);
      var66 = sub_1B0DC (var63);
      ra = ((int *) sp)[3];
      if (!(var66 == 0x00000000))
      {
        var67 = *((int *) 0x00047B20);
        var70 = sub_1B644 (var67);
        var71 = ((int *) var70)[0];
        var72 = var71 + 0xFFFFFFF3;
        ra = ((int *) sp)[3];
        if (!(((var72 < 0x0000001B)) == 0x00000000))
        {
          var73 = ((int *) ((var72 << 0x00000002) + 0x00042218))[0];
          switch () {
          case 0:
          case 2:
          case 5:
          case 9:
            var74 = *((int *) 0x00047B20);
            var75 = ((unsigned char *) var74)[3674];
            ra = ((int *) sp)[3];
            if (!(var75 == 0x00000000))
            {
              var76 = 0x00000002;

            label65:
              ((int *) var74)[49] = var76;
            case 24:

            label66:
              var77 = *((int *) 0x00047B20);

            label67:
              __asm__ ("mtc1       $zr, $fpr14;");
              var78 = 0x3F800000;
              __asm__ ("mtc1       $at, $fpr12;"
                : 
                : "=r"(0x3F800000));
              var79 = 0x43480000;
              __asm__ ("mtc1       $at, $fpr13;"
                : 
                : "=r"(0x43480000));
              var80 = ((int *) var77)[652];
              scePaf_6719522B (var80);
              var83 = *((int *) 0x00047B20);
              __asm__ ("mtc1       $zr, $fpr13;");
              var84 = 0x43480000;
              __asm__ ("mtc1       $at, $fpr12;"
                : 
                : "=r"(0x43480000));
              var85 = ((int *) var83)[652];
              var86 = ((int *) var85)[206];
              scePaf_C772AAD0 (var85, var86);
              var89 = *((int *) 0x00047B20);
              var90 = ((int *) var89)[653];
              if (var90 == 0x00000000)
              {

              label76:
                var94 = scePaf_2338483F ();
                var95 = ((int *) var94)[38];
                if ((((var71 + 0xFFFFFFF0) < 0x00000002)) == 0x00000000)
                {
                  if (var71 == 0x0000000D)
                  {
                    if (!((((var95 < 0x00000001)) | (((var95 ^ 0x00000009) < 0x00000001))) == 0x00000000))
                    {
                    }
                  }
                  else
                  {
                    if (var71 == 0x0000000F)
                    {
                      if (!(var95 != 0x00000008))
                      {
                      }
                    }
                    else
                    {
                      if (var71 == 0x00000022)
                      {
                        if (!(((var95 < 0x00000008)) == 0x00000000))
                        {
                          var106 = ((int *) ((var95 << 0x00000002) + 0x000422A4))[0];
                          switch () {
                          case 0:
                          case 4:
                          case 6:
                          case 0:
                          case 4:
                          case 6:

                          label100:
                            goto label101;
                          case 1:
                          case 7:
                          case 1:
                          case 7:

                          label99:
                            goto label100;
                          case 2:
                          case 3:
                          case 5:
                          case 2:
                          case 3:
                          case 5:

                          label95:
                            goto label100;
                          }
                        }
                      }
                      else
                      {
                        if (var71 == 0x00000027)
                        {
                          if (!(((var95 < 0x00000008)) == 0x00000000))
                          {
                            var105 = ((int *) ((var95 << 0x00000002) + 0x00042284))[0];
                            switch () {
                            goto label100;
                            goto label99;
                            goto label95;
                            goto label95;
                            goto label100;
                            goto label95;
                            goto label100;
                            goto label99;
                            }
                          }
                        }
                        else
                        {
                          if (!(var71 != 0x00000025))
                          {
                          }
                        }
                      }
                    }
                  }
                }
                else
                {
                  if (!((((0x00000000 < var95)) & ((0x00000000 < (var95 ^ 0x00000006)))) == 0x00000000))
                    goto label99;
                }

              label101:
                var96 = *((int *) 0x00047B1C);
                sceVshCommonGui_15B33BDE (var96, "page_optionmenu", "plane_optionmenu", 0x00000001, "mlist_optionmenu", 0x00000000, 0x00000000);
              }
              else
              {
                var91 = ((int *) var90)[11];
                if (!(var91 == 0x00000001))
                  goto label76;
                var107 = 0x42C80000;
                __asm__ ("mtc1       $at, $fpr12;"
                  : 
                  : "=r"(0x42C80000));
                sceVshCommonGui_B298063A ();
              }
              var99 = *((int *) 0x00047B1C);
              scePaf_3C8DD7F0 (var99, "page_optionmenu");
              var102 = *((int *) 0x00047B20);
              sub_1EF20 (var102, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF);
              ra = ((int *) sp)[3];
            }
          case 1:
          case 3:
          case 4:
          case 8:
            var74 = *((int *) 0x00047B20);
            var110 = ((unsigned char *) var74)[3673];
            ra = ((int *) sp)[3];
            if (!(var110 == 0x00000000))
            {
              var76 = 0x00000001;
              goto label65;
            }
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          goto label146;
          case 21:
            var111 = *((int *) 0x00047B20);
            var112 = ((unsigned char *) var111)[3674];
            var113 = 0x00000000;
            if (!(var112 == 0x00000000))
            {
              ((int *) var111)[49] = 0x00000002;
            }

          label57:
            var116 = sub_19B30 (var113);
            ra = ((int *) sp)[3];
            if (!(var116 != 0x00000001))
            {
              var77 = *((int *) 0x00047B20);
              goto label67;
            }
          goto label146;
          goto label146;
          goto label66;
          goto label146;
          case 26:
            var117 = *((int *) 0x00047B20);
            var118 = ((unsigned char *) var117)[3674];
            var113 = 0x00000001;
            if (!(var118 == 0x00000000))
            {
              ((int *) var117)[49] = 0x00000002;
            }
            goto label57;
          }
        }
      }
      goto label160;
    case 5:
      var119 = *((int *) 0x00047B20);
      var120 = ((int *) var119)[61];
      var121 = 0xFFFFFFFF;
      if (var120 == 0x0000000B)
      {
        var121 = 0x00000000;
      }
      else
      {
        if (((var120 < 0x0000000C)) == 0x00000000)
        {
          if (var120 == 0x0000000F)
          {
            var121 = 0x00000006;
          }
          else
          {
          }
        }
        else
        {
          if (var120 == 0x00000008)
          {
            var121 = 0x00000005;
          }
        }
      }
      sub_176A8 (0x00000002);
      ra = ((int *) sp)[3];
      if (!(var121 < 0))
      {
        sub_12674 (var120, var121);
        var126 = *((int *) 0x00047B20);
        var127 = ((int *) var126)[48];
        ((int *) var126)[48] = ((var127 & 0xFFFFFFFD) | (0x00000000 & 0x00000001));
        goto label146;
      }
      goto label160;
    case 6:
      sub_176A8 (0x00000002);
      var130 = *((int *) 0x00047B20);
      var131 = ((unsigned char *) var130)[275];
      ra = ((int *) sp)[3];
      if (var131 == 0x00000000)
        goto label160;
      var132 = ((unsigned char *) var130)[273];
      var18 = ((int *) sp)[2];
      if (!(var132 != 0x00000000))
      {
        sub_16DF0 (0x00000003, 0x00000000);
        var135 = *((int *) 0x00047B1C);
        scePaf_3C8DD7F0 (var135, "page_optionmenu");
        var138 = *((int *) 0x00047B20);
        sub_1F9DC (var138, 0x00000009);
        var141 = *((int *) 0x00047B20);
        var142 = ((int *) var141)[653];
        if (var142 != 0x00000000)
        {
          __asm__ ("mtc1       $zr, $fpr13;");
          var145 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          vsh_DD78EFF5 (var142);
        }
        sub_17F30 (0x0000000D);
        ra = ((int *) sp)[3];
        goto label160;
      }
    case 7:
      var148 = *((int *) 0x00047B20);
      var149 = ((int *) var148)[61];
      ((int *) var148)[62] = var149;
      sub_17F30 (0x00000000);
      var152 = *((int *) 0x00047B20);
      var153 = ((int *) var152)[61];
      sub_123AC (var153);
      ra = ((int *) sp)[3];
      goto label160;
    goto label146;
    case 9:
      sub_199D4 ();
      sub_16DF0 (0x00000004, 0x00000000);
      ra = ((int *) sp)[3];
      goto label160;
    }
  }
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00017C90
 */
void sub_17C90 (int arg1, int arg2)
{
  *((int *) 0x00045738) = arg1;
  *((int *) 0x0004573C) = arg2;
  return;
}

/**
 * Subroutine at address 0x00017CA4
 */
void sub_17CA4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0004573C);
  var2 = *((int *) 0x00045738);
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  if ((var1 & var2) >= 0)
  {
    var8 = *((int *) 0x00047B20);
    var11 = sub_1EA98 ();
    if (var11 < 0)
    {
      var32 = *((int *) 0x00047B1C);
      var35 = scePaf_11FA6015 (var32, "page_topmenu");
      if (!(var35 == 0x00000000))
      {
        scePaf_CA38E212 (var35, 0x00080005, 0x00000000, 0x00000000);
      }
      *((int *) 0x0004573C) = 0xFFFFFFFF;
      *((int *) 0x00045738) = 0xFFFFFFFF;
    }
    else
    {
      if (var2 == 0x00000001)
      {
        var30 = *((int *) 0x00047B20);
        var31 = ((int *) var30)[890];
        ((char *) var30)[3556] = var2;
        if (!(var31 != 0x00000000))
        {
          ((int *) var30)[890] = 0x00050002;
        }

      label20:
        var14 = *((int *) 0x00047B20);
        var15 = ((int *) var14)[652];
        var16 = ((int *) var14)[47];
        var17 = ((int *) var15)[0];
        ((int *) var14)[47] = (var16 | 0x00000004);
        var18 = ((int *) var17)[47];
        var21 var22 = (*var18) (var15, 0x00000000, 0x00000000, var17);
        var23 = *((int *) 0x00047B20);
        var24 = ((int *) var23)[882];
        var25 = ((int *) var24)[35];
        var28 var29 = (*var25) ();
        ((int *) var23)[54] = var28;

      label28:
      }
      else
      {
        if (((var2 < 0x00000002)) != 0x00000000)
        {
          if (!(var2 != 0x00000000))
            goto label20;
        }
        else
        {
          if (!(((var2 < 0x00000005)) == 0x00000000))
          {
            sub_11670 (var2, var1);
            goto label28;
          }
        }
      }
      *((int *) 0x0004573C) = 0xFFFFFFFF;
      *((int *) 0x00045738) = 0xFFFFFFFF;
    }
  }
  ra = ((int *) sp)[5];
  var3 = ((int *) sp)[4];
  var4 = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00017DF0
 */
void sub_17DF0 ()
{
  var1 = *((int *) 0x00047B20);
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_1AF8C (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00017E14
 */
void sub_17E14 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x00047B20);
  var4 = sub_1B644 (var1);
  var5 = 0x00000000;
  if (!(var4 == 0x00000000))
  {
    var5 = ((int *) var4)[1];
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00017E44
 */
void sub_17E44 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = arg1;
  if ((arg1 & 0x000000FF) != 0x00000000)
  {
    var5 = *((int *) 0x00047B20);
    var8 = sub_1B45C (var5, var1, 0x00000007);
    var9 = var8;
    var10 = sp;
    if (var9 == 0xFFFFFC0E)
    {
      var27 = *((int *) 0x00047B20);
      var30 = sub_1B388 (var27, var10);
      var9 = var30;
    }
    var11 = *((int *) 0x00047B20);
    var12 = ((int *) sp)[0];
    var13 = ((int *) var11)[652];
    var14 = (var12 >> 16) & 0x000000FF;
    var15 = ((int *) var13)[206];
    if (var14 == var15)
    {
      var26 = scePaf_BE7032D1 (var13, var14);
      var12 = ((int *) sp)[0];
      if (var9 == var26)
      {

      label19:
        ra = ((int *) sp)[7];
      }
      else
      {
        var11 = *((int *) 0x00047B20);

      label14:
        var16 = ((int *) var11)[892];
        sub_2437C (var16, ((var12 & 0x00FF0000) >> 0x00000010), var9);
        var19 = *((int *) 0x00047B20);
        var20 = ((int *) sp)[0];
        var21 = ((int *) var19)[652];
        scePaf_5A774BDC (var21, ((var20 & 0x00FF0000) >> 0x00000010), var9);
        ra = ((int *) sp)[7];
      }
    }
    else
    goto label14;
  }
  else
  goto label19;
  var2 = ((int *) sp)[6];
  var3 = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00017F20
 */
void sub_17F20 ()
{
  var1 = 0x00040000;
  __asm__ ("lwc1       $fpr00, 22156($v0);");
  __asm__ ("swc1       $fpr12, 22156($v0);"
    : 
    : "=r"(0x00040000));
  return;
}

/**
 * Subroutine at address 0x00017F30
 */
void sub_17F30 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[7] = ra;
  ((int *) sp)[4] = s0;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var1 = *((int *) 0x00047B20);
  var2 = ((unsigned char *) var1)[353];
  if (var2 != 0x00000000)
  {

  label148:
    ra = ((int *) sp)[7];

  label149:
    var32 = ((int *) sp)[6];
  }
  else
  {
    if (((arg1 < 0x00000014)) == 0x00000000)
    {
      ra = ((int *) sp)[7];
      goto label149;
    }
    else
    {
      var3 = ((int *) ((arg1 << 0x00000002) + 0x000422C4))[0];
      switch () {
      case 0:
        var4 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr14;");
        var5 = ((int *) var4)[652];
        var6 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("lwc1       $fpr13, 22156($s0);");
        scePaf_393FBFD1 (var5);
        var9 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var10 = 0xC3020000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3020000));
        var11 = ((int *) var9)[652];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var12 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var13 = ((int *) var11)[0];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("lwc1       $fpr13, 4($sp);"
                 "lwc1       $fpr12, 22156($s0);");
        ((int *) sp)[2] = 0x00000000;
        var14 = ((int *) var13)[50];
        var15 = sp;
        var18 var19 = (*var14) (var11, 0x01000001, 0x00000004, var15);
        var20 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr12, 22156($s0);");
        var21 = ((int *) var20)[652];
        scePaf_960C6893 (var21);
        __asm__ ("lwc1       $fpr12, 22156($s0);");
        var24 = *((int *) 0x00047B20);
        ((int *) sp)[0] = 0x00000000;
        var25 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr12, $fpr12, $fpr00;"
                 "lwc1       $fpr13, 0($sp);"
          : 
          : "=r"(0x3F000000));
        var26 = ((int *) var24)[652];
        var27 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var28 = sp;
        __asm__ ("swc1       $fpr13, 4($sp);"
                 "swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("swc1       $fpr13, 8($sp);"
          : 
          : "=r"(sp));
        scePaf_75D8CDC6 (var26, var28, 0x00000000);
        var31 = *((int *) 0x00047B20);

      label147:
        ((int *) var31)[60] = arg1;
        goto label148;
      case 1:
        sub_17F30 (0x00000000);
        var37 = *((int *) 0x00047B20);
        var38 = 0x41200000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x41200000));
        var39 = ((int *) var37)[652];
        var40 = ((int *) var39)[206];
        var41 = ((int *) var39)[216];
        var42 = ((int *) (var41 + (var40 << 0x00000002)))[0];
        scePaf_676BAC3B (var42);
        var31 = *((int *) 0x00047B20);
        goto label147;
      case 2:
        var45 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr14;");
        var46 = ((int *) var45)[652];
        var47 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("lwc1       $fpr13, 22156($s0);");
        scePaf_393FBFD1 (var46);
        var50 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var51 = 0xC33E0000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC33E0000));
        var52 = ((int *) var50)[652];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var53 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var54 = ((int *) var52)[0];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var55 = sp;
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var56 = ((int *) var54)[50];
        ((int *) sp)[2] = 0x00000000;
        var59 var60 = (*var56) (var52, 0x01000001, 0x00000004, var55);
        var61 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "mtc1       $zr, $fpr14;");
        var62 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42400000));
        var63 = ((int *) var61)[652];
        scePaf_B081AAC4 (var63);
        __asm__ ("lwc1       $fpr12, 22156($s0);");
        var66 = *((int *) 0x00047B20);
        ((int *) sp)[0] = 0x00000000;
        var67 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr12, $fpr12, $fpr00;"
                 "lwc1       $fpr13, 0($sp);"
          : 
          : "=r"(0x3F000000));
        var68 = ((int *) var66)[652];
        var69 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var70 = sp;
        __asm__ ("swc1       $fpr13, 4($sp);"
                 "swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("swc1       $fpr13, 8($sp);"
          : 
          : "=r"(sp));
        scePaf_75D8CDC6 (var68, var70, 0x00000000);
        var73 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42400000));
        var74 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var75 = sp;
        var76 = ((int *) var74)[652];
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var77 = ((int *) var76)[206];
        var78 = ((int *) var76)[216];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var79 = ((int *) (var78 + (var77 << 0x00000002)))[0];
        var80 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 12($sp);"
                 "swc1       $fpr13, 8($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));

      label130:
        scePaf_FFA6B745 (var79, var75);
        var31 = *((int *) 0x00047B20);
        goto label147;
      case 3:
        var83 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;");
        var84 = ((int *) var83)[652];
        __asm__ ("lwc1       $fpr13, 22156($s0);");
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_393FBFD1 (var84);
        var87 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var88 = 0xC3700000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3700000));
        var89 = ((int *) var87)[652];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var90 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var91 = ((int *) var89)[0];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var92 = ((int *) var91)[50];
        ((int *) sp)[2] = 0x00000000;
        var93 = sp;
        var96 var97 = (*var92) (var89, 0x01000001, 0x00000004, var93);
        var98 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "mtc1       $zr, $fpr14;");
        var99 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42400000));
        var100 = ((int *) var98)[652];
        scePaf_B081AAC4 (var100);
        var103 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var104 = 0x42180000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42180000));
        var105 = sp;
        var106 = ((int *) var103)[652];
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var107 = ((int *) var106)[206];
        var108 = ((int *) var106)[216];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var109 = ((int *) (var108 + (var107 << 0x00000002)))[0];
        __asm__ ("swc1       $fpr13, 8($sp);"
          : 
          : "=r"(sp));

      label120:
        var110 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        goto label130;
      case 4:
        sub_17F30 (0x00000003);
        __asm__ ("lwc1       $fpr14, 22156($s0);");
        var113 = 0x40A00000;
        __asm__ ("mtc1       $at, $fpr20;"
          : 
          : "=r"(0x40A00000));
        var114 = *((int *) 0x00047B20);
        __asm__ ("div.s      $fpr14, $fpr14, $fpr20;"
                 "mtc1       $zr, $fpr12;");
        var115 = 0x43200000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43200000));
        var116 = ((int *) var114)[652];
        scePaf_393FBFD1 (var116);
        var119 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var120 = 0xC2200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2200000));
        var121 = sp;
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var122 = ((int *) var119)[652];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var123 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr13, 8($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_75D8CDC6 (var122, var121, 0x00000000);
        var126 = 0x41000000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "lwc1       $fpr12, 22156($s0);"
          : 
          : "=r"(0x41000000));
        var127 = *((int *) 0x00047B20);
        __asm__ ("swc1       $fpr00, 0($sp);"
                 "add.s      $fpr13, $fpr12, $fpr12;"
          : 
          : "=r"(sp));
        var128 = sp;
        var129 = ((int *) var127)[652];
        ((int *) sp)[1] = 0x00000000;
        __asm__ ("div.s      $fpr13, $fpr13, $fpr20;");
        var130 = ((int *) var129)[206];
        var131 = ((int *) var129)[216];
        ((int *) sp)[2] = 0x00000000;
        var132 = ((int *) (var131 + (var130 << 0x00000002)))[0];
        goto label120;
      case 5:
        var133 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;");
        var134 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42400000));
        var135 = ((int *) var133)[652];
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_B081AAC4 (var135);
        var138 = *((int *) 0x00047B20);
        var139 = 0xC38C0000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC38C0000));

      label101:
        var140 = ((int *) var138)[652];
        ((int *) sp)[1] = 0x00000000;

      label102:
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var141 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 12($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        var142 = ((int *) var140)[0];
        __asm__ ("lwc1       $fpr12, 22156($v0);");

      label103:
        __asm__ ("lwc1       $fpr13, 4($sp);");
        var143 = ((int *) var142)[50];
        var144 = sp;
        var147 var148 = (*var143) (var140, 0x01000001, 0x00000004, var144);
        var31 = *((int *) 0x00047B20);
        goto label147;
      case 6:
        var149 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;");
        var150 = 0x42180000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42180000));
        var151 = ((int *) var149)[652];
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_B081AAC4 (var151);
        var138 = *((int *) 0x00047B20);
        var154 = 0xC3870000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3870000));
        goto label101;
      case 7:
        var155 = *((int *) 0x00047B20);
        var156 = 0x41200000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x41200000));
        var157 = ((int *) var155)[652];
        var158 = ((int *) var157)[206];
        var159 = ((int *) var157)[216];
        var160 = ((int *) (var159 + (var158 << 0x00000002)))[0];
        scePaf_676BAC3B (var160);
        var163 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s0);"
                 "mtc1       $zr, $fpr14;");
        var164 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var165 = ((int *) var163)[652];
        scePaf_88DB8FB1 (var165);
        var168 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s0);"
                 "mtc1       $zr, $fpr14;");
        var169 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var170 = ((int *) var168)[652];
        scePaf_E9272129 (var170);
        var173 = *((int *) 0x00047B20);
        var174 = 0xC3250000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3250000));

      label93:
        ((int *) sp)[1] = 0x00000000;

      label94:
        var175 = ((int *) var173)[652];
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var176 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var142 = ((int *) var175)[0];
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        goto label103;
      case 8:
        __asm__ ("lwc1       $fpr14, 22156($s0);");
        var177 = 0x40800000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x40800000));
        var178 = 0x40A00000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr13, $fpr14, $fpr13;"
                 "div.s      $fpr14, $fpr14, $fpr00;"
          : 
          : "=r"(0x40A00000));
        var179 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;");
        var180 = ((int *) var179)[652];
        __asm__ ("div.s      $fpr13, $fpr13, $fpr00;");
        scePaf_393FBFD1 (var180);
        var173 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var183 = 0xC3700000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3700000));
        goto label94;
      case 9:
        __asm__ ("lwc1       $fpr14, 22156($s0);");
        var184 = 0x40800000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x40800000));
        var185 = 0x40A00000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr13, $fpr14, $fpr13;"
                 "div.s      $fpr14, $fpr14, $fpr00;"
          : 
          : "=r"(0x40A00000));
        var186 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;");
        var187 = ((int *) var186)[652];
        __asm__ ("div.s      $fpr13, $fpr13, $fpr00;");
        scePaf_393FBFD1 (var187);
        var173 = *((int *) 0x00047B20);
        var190 = 0xC3910000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3910000));
        goto label93;
      case 10:
        var138 = *((int *) 0x00047B20);
        var191 = 0xC3820000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3820000));
        goto label101;
      case 11:
        var138 = *((int *) 0x00047B20);
        var192 = 0xC3A50000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3A50000));
        goto label101;
      case 12:
        var193 = *((int *) 0x00047B20);
        ((int *) sp)[1] = 0x00000000;
        var194 = 0xC38F8000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC38F8000));
        var140 = ((int *) var193)[652];
        goto label102;
      case 13:
        var195 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "mtc1       $zr, $fpr13;");
        var196 = ((int *) var195)[652];
        scePaf_51533BD3 (var196);
        var199 = *((int *) 0x00047B20);
        var200 = ((int *) var199)[60];
        var201 = ((int *) var199)[652];
        if ((((0x00000000 < var200)) & ((0x00000000 < (var200 ^ 0x00000007)))) == 0x00000000)
        {
          __asm__ ("mtc1       $zr, $fpr12;");
          var220 = ((int *) var201)[206];
          var221 = ((int *) var201)[216];
          __asm__ ("mov.s      $fpr13, $fpr12;");
          var222 = ((int *) (var221 + (var220 << 0x00000002)))[0];
          __asm__ ("mov.s      $fpr14, $fpr12;");
          scePaf_06172A6E (var222);
        }
        else
        {
          __asm__ ("lwc1       $fpr13, 22156($s0);"
                   "mtc1       $zr, $fpr14;");
          var202 = ((int *) var201)[206];
          var203 = ((int *) var201)[216];
          var204 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x3F800000));
          var205 = ((int *) (var203 + (var202 << 0x00000002)))[0];
          scePaf_06172A6E (var205);
          var208 = *((int *) 0x00047B20);
          var209 = ((int *) var208)[60];
          if (var209 == 0x00000004)
          {
            sub_17F30 (0x00000004);
          }
        }
        var212 = sceVshCommonGui_414454B7 ();
        ra = ((int *) sp)[7];
        if (var212 == 0x00000000)
          goto label149;
        var213 = *((int *) 0x00047B20);
        var214 = ((unsigned char *) var213)[275];
        var32 = ((int *) sp)[6];
        if (!(var214 == 0x00000000))
        {
          var215 = 0x42C80000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42C80000));
          sceVshCommonGui_B298063A ();
          ra = ((int *) sp)[7];
          goto label149;
        }
      case 14:
        var225 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "mtc1       $zr, $fpr13;");
        var226 = ((int *) var225)[652];
        scePaf_043C75D2 (var226);
        var229 = *((int *) 0x00047B20);
        var230 = ((int *) var229)[60];
        if ((((0x00000000 < var230)) & ((0x00000000 < (var230 ^ 0x00000007)))) != 0x00000000)
        {
          var239 = ((int *) var229)[652];
          __asm__ ("mtc1       $zr, $fpr12;"
                   "lwc1       $fpr13, 22156($s0);");
          var240 = ((int *) var239)[206];
          var241 = ((int *) var239)[216];
          __asm__ ("mov.s      $fpr14, $fpr12;");
          var242 = ((int *) (var241 + (var240 << 0x00000002)))[0];
          scePaf_06172A6E (var242);
        }
        var233 = sceVshCommonGui_414454B7 ();
        ra = ((int *) sp)[7];
        if (var233 == 0x00000000)
          goto label149;
        var234 = *((int *) 0x00047B20);
        var235 = ((unsigned char *) var234)[275];
        var32 = ((int *) sp)[6];
        if (!(var235 == 0x00000000))
        {
          var236 = 0x42C80000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42C80000));
          sceVshCommonGui_6367CB49 ();
          ra = ((int *) sp)[7];
          goto label149;
        }
      case 15:
        var245 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s0);"
                 "mtc1       $zr, $fpr14;");
        var246 = 0x3E4CCCCD;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3E4CCCCD));
        var247 = ((int *) var245)[652];
        scePaf_ED87D485 (var247);
        var250 = *((int *) 0x00047B20);
        var251 = ((int *) var250)[60];
        if ((((0x00000000 < var251)) & ((0x00000000 < (var251 ^ 0x00000007)))) != 0x00000000)
        {
          var261 = ((int *) var250)[652];
          __asm__ ("mtc1       $zr, $fpr12;"
                   "lwc1       $fpr13, 22156($s0);");
          var262 = ((int *) var261)[206];
          var263 = ((int *) var261)[216];
          __asm__ ("mov.s      $fpr14, $fpr12;");
          var264 = ((int *) (var263 + (var262 << 0x00000002)))[0];
          scePaf_06172A6E (var264);
        }
        var254 = sceVshCommonGui_414454B7 ();
        ra = ((int *) sp)[7];
        if (var254 == 0x00000000)
          goto label149;
        var255 = *((int *) 0x00047B20);
        var256 = ((unsigned char *) var255)[275];
        var32 = ((int *) sp)[6];
        if (!(var256 == 0x00000000))
        {
          var257 = 0x3ECCCCCD;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x3ECCCCCD));
          var258 = 0x42C80000;
          __asm__ ("mtc1       $at, $fpr13;"
            : 
            : "=r"(0x42C80000));
          sceVshCommonGui_82938BF0 ();
          ra = ((int *) sp)[7];
          goto label149;
        }
      case 16:
        var267 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($v0);");
        var268 = ((int *) var267)[652];
        __asm__ ("mtc1       $zr, $fpr12;");

      label27:
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_E9272129 (var268);
        ra = ((int *) sp)[7];
        goto label149;
      case 17:
        var271 = *((int *) 0x00047B20);
        var272 = 0x41200000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x41200000));
        var273 = ((int *) var271)[652];
        var274 = ((int *) var273)[206];
        var275 = ((int *) var273)[216];
        var276 = ((int *) (var275 + (var274 << 0x00000002)))[0];
        scePaf_676BAC3B (var276);
        var279 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr12, 22156($s0);"
                 "mtc1       $zr, $fpr13;");
        var280 = ((int *) var279)[652];
        var281 = ((int *) var280)[206];
        scePaf_9EC2F1FF (var280, var281);
        var284 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;"
                 "lwc1       $fpr13, 22156($s0);");
        var285 = ((int *) var284)[652];
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_6719522B (var285);
        var288 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s0);"
                 "mtc1       $zr, $fpr12;");
        var289 = ((int *) var288)[652];
        goto label27;
      case 18:
        var290 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s1);");
        var291 = ((int *) var290)[652];
        __asm__ ("mtc1       $zr, $fpr14;");
        var292 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var293 = ((int *) var291)[206];
        scePaf_6719522B (var291);
        var296 = *((int *) 0x00047B20);
        var297 = var293 << 0x00000002;
        __asm__ ("lwc1       $fpr13, 22156($s1);");
        var298 = ((int *) var296)[652];
        __asm__ ("mtc1       $zr, $fpr14;");
        var299 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var300 = ((int *) var298)[216];
        var301 = ((int *) (var300 + var297))[0];
        scePaf_8906478F (var301);
        var304 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s1);"
                 "mtc1       $zr, $fpr14;");
        var305 = ((int *) var304)[652];
        var306 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));

      label16:
        var307 = ((int *) var305)[216];
        var308 = ((int *) (var307 + var297))[0];
        scePaf_EBF1BC9F (var308);
        ra = ((int *) sp)[7];
        goto label149;
      case 19:
        var311 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s1);");
        var312 = ((int *) var311)[652];
        __asm__ ("mtc1       $zr, $fpr14;");
        var313 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var314 = ((int *) var312)[206];
        scePaf_6719522B (var312);
        var317 = *((int *) 0x00047B20);
        var297 = var314 << 0x00000002;
        __asm__ ("lwc1       $fpr13, 22156($s1);");
        var318 = ((int *) var317)[652];
        __asm__ ("mtc1       $zr, $fpr14;");
        var319 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var320 = ((int *) var318)[216];
        var321 = ((int *) (var320 + var297))[0];
        scePaf_8906478F (var321);
        var324 = *((int *) 0x00047B20);
        __asm__ ("lwc1       $fpr13, 22156($s1);"
                 "mtc1       $zr, $fpr14;");
        var325 = 0x3E4CCCCD;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3E4CCCCD));
        var305 = ((int *) var324)[652];
        goto label16;
      }
    }
  }
  var33 = ((int *) sp)[5];
  var34 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00018938
 */
void sub_18938 ()
{
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[60];
  return;
}

/**
 * Subroutine at address 0x00018948
 */
void sub_18948 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  __asm__ ("swc1       $fpr20, 64($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = fp;
  ((int *) sp)[11] = s7;
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = arg1;
  if ((arg1 & 0x000000FF) != 0x00000000)
  {
    var10 = *((int *) 0x00047B20);
    var11 = sp;
    var12 = (arg1 >> 16) & 0x000000FF;
    var15 = sub_1B45C (var10, var11, 0x00000007);
    var16 = var15;
    ra = ((int *) sp)[13];
    if (!(var16 == 0xFFFFFC0E))
    {
      var17 = 0x42C7CCCD;
      __asm__ ("mtc1       $at, $fpr0;"
               "c.eq.s     $fpr20, $fpr00;"
        : 
        : "=r"(0x42C7CCCD));
      __asm__ ("bc1f       0x00018ABC;");
      var18 = *((int *) 0x00047B20);
      {
        var38 = ((int *) var18)[652];
        __asm__ ("mov.s      $fpr12, $fpr20;");
        var39 = 0xFFFFFFFF;
        scePaf_8D925FB9 (var38, var12, var16);
        var42 = 0x00000000;
        var43 = *((int *) 0x00047B20);
        while (1) {
          var44 = var42 << 0x00000002;
          var45 = var44 + var43;
          var46 = ((int *) var45)[64];
          var49 = sub_1B45C (var43, (var45 + 0x00000100), 0x00000007);
          if (((((((var46 & 0x00FF0000) >> 0x00000010) ^ var12) < 0x00000001)) & (((var49 ^ var16) < 0x00000001))) != 0x00000000)
          {
            var39 = var42;
          }
          else
          {
            var50 = *((int *) 0x00047B20);
            if (var39 < 0)
            {
              var54 = ((int *) (var44 + var50))[64];
              var39 = !(var54) ? var42 : var39;
            }
            var42 = var42 + 0x00000001;
            var43 = *((int *) 0x00047B20);
            if (((var42 < 0x00000002)) != 0x00000000)
              continue;
            break;
          }
        }
        var51 = *((int *) 0x00047B20);
        if (!(var39 < 0))
        {
          var52 = (var39 << 0x00000002) + var51;
          var53 = ((int *) sp)[0];
          __asm__ ("swc1       $fpr20, 264($v1);"
            : 
            : "=r"(var52));
          ((int *) var52)[64] = var53;
        }

      label34:
        ra = ((int *) sp)[13];
      }
      else
      {
        var19 = ((int *) var18)[652];
        scePaf_0C07B7EC (var19, var12, var16);
        var22 = *((int *) 0x00047B20);
        var23 = ((int *) var22)[653];
        if (!(var23 == 0x00000000))
        {
          var24 = ((unsigned char *) sp)[0];
          if (var24 == 0x00000002)
          {
            sub_09BB8 (var23, 0x00000000);
          }
        }
        var26 = *((int *) 0x00047B20);
        while (1) {
          var27 = var25 << 0x00000002;
          var28 = var27 + var26;
          var29 = ((int *) var28)[64];
          var32 = sub_1B45C (var26, (var28 + 0x00000100), 0x00000007);
          var25 = var25 + 0x00000001;
          if (((((((var29 & 0x00FF0000) >> 0x00000010) ^ var12) < 0x00000001)) & (((var32 ^ var16) < 0x00000001))) != 0x00000000)
            break;
          if (((var25 < 0x00000002)) != 0x00000000)
          {
            var26 = *((int *) 0x00047B20);
            continue;
          }
          else
          {
            ra = ((int *) sp)[13];
          }
          goto label35;
        }
        var33 = *((int *) 0x00047B20);
        var34 = 0x42C7CCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42C7CCCD));
        var35 = var27 + var33;
        __asm__ ("swc1       $fpr00, 264($v0);"
          : 
          : "=r"(var35));
        ((int *) var35)[64] = 0x00000000;
        goto label34;
      }
    }
  }
  else
  goto label34;

label35:
  var1 = ((int *) sp)[12];
  var2 = ((int *) sp)[11];
  var3 = ((int *) sp)[10];
  var4 = ((int *) sp)[9];
  var5 = ((int *) sp)[8];
  var6 = ((int *) sp)[7];
  var7 = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 64($sp);");
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00018B68
 */
int sub_18B68 ()
{
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[54];
  return var2;
}

/**
 * Subroutine at address 0x00018B78
 */
void sub_18B78 ()
{
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[55];
  return;
}

/**
 * Subroutine at address 0x00018B88
 */
void sub_18B88 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[8] = s0;
  var2 = arg1;
  ((int *) sp)[9] = ra;
  ((int *) arg1)[0] = 0x00000000;
  __asm__ ("swc1       $fpr00, 12($a0);"
    : 
    : "=r"(arg1));
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  if (!(((arg2 < 0x0000000A)) == 0x00000000))
  {
    var3 = ((int *) ((arg2 << 0x00000002) + 0x00042314))[0];
    switch () {
    case 0:
      var4 = 0xC2DC0000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($s0);"
        : 
        : "=r"(0xC2DC0000), "=r"(var2));
      goto label11;
    case 1:
    case 3:
      var6 = 0xC2BC0000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC2BC0000));
      __asm__ ("swc1       $fpr00, 0($s0);"
        : 
        : "=r"(var2));
      goto label11;
    case 2:
      var7 = 0xC2D00000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC2D00000));
      __asm__ ("swc1       $fpr00, 0($s0);"
        : 
        : "=r"(var2));
      goto label11;
    goto label11;
    case 5:
      var8 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
      __asm__ ("swc1       $fpr00, 0($s0);"
        : 
        : "=r"(var2));
      goto label11;
    goto label11;
    goto label11;
    goto label11;
    case 9:
      var9 = *((int *) 0x00047B20);
      var10 = sp;
      var11 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var12 = ((int *) var9)[652];
      var13 = sp + 0x00000010;
      ((int *) sp)[4] = 0x00000000;
      __asm__ ("swc1       $fpr00, 28($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[5] = 0x00000000;
      ((int *) sp)[6] = 0x00000000;
      scePaf_A6810C75 (var10, var12, 0x00000000, var13);
      var16 = ((int *) sp)[1];
      var17 = ((int *) sp)[2];
      var18 = ((int *) sp)[3];
      var19 = ((int *) sp)[0];
      ((int *) var2)[1] = var16;
      ((int *) var2)[0] = var19;
      ((int *) var2)[2] = var17;
      ((int *) var2)[3] = var18;
      goto label11;
    }
  }
case 4:
case 6:
case 7:
case 8:

label11:
  ra = ((int *) sp)[9];
  var5 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00018C7C
 */
void sub_18C7C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = 0x00000005;
  var2 = arg1;
  ((int *) sp)[1] = ra;
  if (!(arg2 == 0x00000003))
  {
    if (((arg2 < 0x00000004)) == 0x00000000)
    {
      var3 = 0x00000005;
      var1 = 0x00000009;
    }
    else
    {
      var3 = 0x00000002;
      var1 = 0x00000001;
    }
    if (arg2 != var3)
    {
      var1 = 0xFFFFFC0E;
    }
  }
  var4 = *((int *) 0x00047B20);
  sub_217D8 (var2, var4, var1);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00018CE0
 */
void sub_18CE0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[0] = ra;
  if (!(var1 != 0x00000000))
  {
    var2 = *((int *) 0x00047B20);
    var3 = ((int *) var2)[47];
    ((int *) var2)[47] = (var3 | 0x00000002);
  }
  var4 = *((int *) 0x00047B20);
  sub_21F04 (var4, var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00018D1C
 */
void sub_18D1C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x00047B1C);
  var4 = scePaf_11FA6015 (var1, "page_dialog", arg3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00018D44
 */
void sub_18D44 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((unsigned char *) var1)[275];
  var3 = 0x42C80000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x42C80000));
  if (!(var2 == 0x00000000))
  {
    ((char *) var1)[275] = 0x00000000;
    var4 = *((int *) 0x00047B1C);
    sceVshCommonGui_69A07897 (var4, "page_optionmenu", 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00018D94
 */
void sub_18D94 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  var2 = *((int *) 0x00047B20);
  var3 = ((unsigned char *) var2)[276];
  var4 = 0xFFFFFC0E;
  if (!(var3 == 0x00000000))
  {
    ((int *) sp)[0] = 0x00000000;
    var5 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "lwc1       $fpr12, 0($sp);"
      : 
      : "=r"(0x3F800000));
    var6 = ((int *) var2)[652];
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr13, $fpr12;"
             "swc1       $fpr12, 4($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr12, 8($sp);"
      : 
      : "=r"(sp));
    scePaf_75D8CDC6 (var6, var1, 0x00000000);
    sceVshCommonGui_A745DB12 (0x00000000);
    var11 = *((int *) 0x00047B1C);
    scePaf_E305A594 (var11, "page_info");
    var14 = *((int *) 0x00047B20);
    var4 = 0x00000000;
    ((char *) var14)[276] = 0x00000000;
  }
  ra = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00018E20
 */
void sub_18E20 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00047B20);
  var2 = ((unsigned char *) var1)[273];
  var3 = 0xFFFFFC0E;
  if (var2 == 0x00000000)
  {

  label35:
    ra = ((int *) sp)[2];
  }
  else
  {
    var6 = scePaf_A78805B0 ("auth_plugin");
    if (var6 == 0x00000000)
    {

    label11:
      var10 = *((int *) 0x00047B20);
    }
    else
    {
      var9 = scePaf_4E87FDFC (var6, 0x00000001);
      var10 = *((int *) 0x00047B20);
      if (!(var9 == 0x00000000))
      {
        var11 = ((int *) var9)[1];
        var14 var15 = (*var11) (var10);
        goto label11;
      }
    }
    var16 = ((int *) var10)[884];
    if (var16 != 0x00000000)
    {
      var44 = sub_1F7A4 (var10, var16);
      var10 = *((int *) 0x00047B20);
    }
    var17 = ((int *) var10)[885];
    if (var17 != 0x00000000)
    {
      var41 = sub_1F7A4 (var10, var17);
      var10 = *((int *) 0x00047B20);
    }
    var18 = ((int *) var10)[886];
    if (var18 != 0x00000000)
    {
      var38 = sub_1F7A4 (var10, var18);
    }
    var19 = *((int *) 0x00047B20);
    sub_1F804 (var19);
    var22 = *((int *) 0x00047B20);
    var23 = ((int *) var22)[47];
    var3 = 0x00000000;
    if ((var23 & 0x00000004) == 0x00000000)
      goto label35;
    var24 = ((int *) var22)[891];
    ra = ((int *) sp)[2];
    if (!(var24 != 0x00000000))
    {
      var25 = ((unsigned char *) var22)[273];
      if (var25 == 0x00000000)
      {
        sub_1199C ();
        var30 = *((int *) 0x00047B20);
        var33 = sub_21E8C (var30, 0x00000000);
        var34 = *((int *) 0x00047B20);
        var35 = ((int *) var34)[47];
        ((char *) var34)[355] = 0x00000001;
        ((int *) var34)[47] = (((var35 | 0x00000400) & 0xFFFFFFFB) | (0x00000000 & 0x00000001));
      }
      var3 = 0x00000000;
      goto label35;
    }
  }
  var26 = ((int *) sp)[1];
  var27 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00018F50
 */
int sub_18F50 ()
{
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[93];
  return ((0x00000000 < (!var2)));
}

/**
 * Subroutine at address 0x00018F68
 */
void sub_18F68 ()
{
  var1 = *((int *) 0x00047B20);
  ((int *) var1)[93] = 0xFFFFFFFF;
  ((char *) var1)[358] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x00018F80
 */
void sub_18F80 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[352];
  if (var2 != 0x00000000)
  {
    var5 var6 = (*var2) (arg1, 0x00000000, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00018FB8
 */
void sub_18FB8 (int arg1)
{
  var1 = *((int *) 0x00047B20);
  ((int *) var1)[90] = arg1;
  return;
}

/**
 * Subroutine at address 0x00018FC8
 */
void sub_18FC8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) var1)[272];
  ((int *) var1)[90] = 0x00000001;
  if (var2 == 0x00000000)
  {
    var4 = *((int *) 0x00047B20);
    if (((arg1 < 0x00000020)) == 0x00000000)
    {

    label103:
      ((int *) var4)[90] = 0x80108202;

    label105:
      ra = ((int *) sp)[1];
    }
    else
    {
      var5 = ((int *) ((arg1 << 0x00000002) + 0x0004233C))[0];
      switch () {
      case 0:
      case 13:
      case 14:
      case 17:
      case 20:
      case 23:
        var4 = *((int *) 0x00047B20);
        goto label103;
      case 1:
        var6 = *((int *) 0x00047B20);

      label101:
        ((int *) var6)[90] = 0x00000000;
        goto label105;
      case 2:

      label88:
        var9 = scePaf_A78805B0 ("sysconf_plugin");
        if (var9 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var12 = scePaf_4E87FDFC (var9, 0x00000001);
          if (var12 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var12)[2];

          label97:
            var16 var17 = (*var13) (0x00018FB8);
            ra = ((int *) sp)[1];
          }
        }
      case 3:
        var20 = scePaf_A78805B0 ("netconf_plugin");
        if (var20 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var23 = scePaf_4E87FDFC (var20, 0x00000001);
          if (var23 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var23)[7];
            goto label97;
          }
        }
      case 4:

      label69:
        var26 = scePaf_A78805B0 ("update_plugin");
        if (var26 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var29 = scePaf_4E87FDFC (var26, 0x00000001);
          if (var29 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var29)[1];
            goto label97;
          }
        }
      case 5:
      case 6:
      case 8:
        var32 = scePaf_A78805B0 ("launcher_plugin");
        if (var32 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var35 = scePaf_4E87FDFC (var32, 0x00000001);
          if (var35 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var35)[10];
            goto label97;
          }
        }
      case 7:
      case 9:
        goto label69;
      case 10:
        goto label69;
      case 11:
        goto label69;
      case 12:

      label47:
        var38 = scePaf_A78805B0 ("netplay_client_plugin");
        if (var38 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var41 = scePaf_4E87FDFC (var38, 0x00000001);
          if (var41 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var41)[4];
            goto label97;
          }
        }
      case 15:
      case 28:
      case 31:
        var44 = scePaf_A78805B0 ("game_plugin");
        if (var44 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var47 = scePaf_4E87FDFC (var44, 0x00000001);
          if (var47 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var47)[6];
            goto label97;
          }
        }
      case 16:
      case 22:
      case 26:
      case 29:
        var50 = scePaf_A78805B0 ("htmlviewer_plugin");
        if (var50 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var53 = scePaf_4E87FDFC (var50, 0x00000001);
          if (var53 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var53)[3];
            goto label97;
          }
        }
      case 18:
        goto label47;
      case 19:
        goto label69;
      case 21:
        goto label69;
      case 24:
        var56 = scePaf_A78805B0 ("skype_plugin");
        if (var56 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var59 = scePaf_4E87FDFC (var56, 0x00000001);
          if (var59 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var59)[11];
            goto label97;
          }
        }
      case 25:
        goto label69;
      case 27:
        var62 = scePaf_A78805B0 ("radioshack_plugin");
        if (var62 == 0x00000000)
        {
          var6 = *((int *) 0x00047B20);
          goto label101;
        }
        else
        {
          var65 = scePaf_4E87FDFC (var62, 0x00000001);
          if (var65 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var65)[5];
            goto label97;
          }
        }
      case 30:
        goto label88;
      }
    }
  }
  else
  {
    ((int *) var1)[90] = 0x00000000;
    goto label105;
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019278
 */
int sub_19278 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  var2 = *((int *) 0x00047B20);
  ((int *) sp)[4] = s4;
  ((int *) sp)[6] = s6;
  var3 = 0x00000000;
  __asm__ ("swc1       $fpr20, 32($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[7] = ra;
  ((int *) sp)[5] = s5;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var6 = sub_21E8C (var2, 0x00000001);
  var7 = *((int *) 0x00047B20);

  label5:
  while (1) {
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var8 = ((int *) var7)[652];
    var9 = ((int *) var8)[206];
    var10 = var8;
    if (var9 == var1)
      break;
    if (((var9 < var1)) == 0x00000000)
    {
      scePaf_EF154C08 (var10, 0x00000000);
      var7 = *((int *) 0x00047B20);
      continue;
    }
    else
    {
      scePaf_AD91D955 (var10, 0x00000000);
      var7 = *((int *) 0x00047B20);
      continue;
    }
    goto label5;
  }
  var15 = *((int *) 0x00047B20);
  var16 = 0xFFFFFFFF;
  var17 = ((int *) var15)[652];
  var20 = scePaf_BE7032D1 (var17, 0xFFFFFFFF);
  var21 = *((int *) 0x00047B20);
  if (var20 < 0)
  {
    var54 = sub_21E8C (var21, 0x00000000);
    var44 = 0x80108203;
  }
  else
  {
    var22 = *((int *) 0x00047B20);
    while (1) {
      var23 = ((int *) var22)[652];
      var24 = 0x00000000;
      var27 = scePaf_BE7032D1 (var23, 0xFFFFFFFF);
      var28 = *((int *) 0x00047B20);
      var16 = var27;
      var31 = sub_1B644 (var28);
      var32 = ((int *) var31)[0];
      __asm__ ("mov.s      $fpr12, $fpr20;");
      if (var32 == arg2)
        break;
      var24 = 0x80108203;
      if (var16 < 0)
        break;
      var33 = *((int *) 0x00047B20);
      if (var3 != 0x00000000)
      {
        var37 = ((int *) var33)[652];
        scePaf_D2C9B526 (var37);
        var22 = *((int *) 0x00047B20);
        if (var16 != var16)
          continue;
        var24 = 0x80108203;
      }
      else
      {
        var34 = ((int *) var33)[652];
        scePaf_5FB8C90A (var34);
        var22 = *((int *) 0x00047B20);
        if (var16 != 0x00000000)
          continue;
        var3 = 0x00000001;
        var16 = 0xFFFFFFFF;
        continue;
      }
    }
    var40 = *((int *) 0x00047B20);
    var43 = sub_21E8C (var40, 0x00000000);
    var44 = var24;
  }
  ra = ((int *) sp)[7];
  var45 = ((int *) sp)[6];
  var46 = ((int *) sp)[5];
  var47 = ((int *) sp)[4];
  var48 = ((int *) sp)[3];
  var49 = ((int *) sp)[2];
  var50 = ((int *) sp)[1];
  var51 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return var44;
}

/**
 * Subroutine at address 0x000193F4
 */
int sub_193F4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = s5;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  while (1) {
    var3 = *((int *) 0x00047B20);
    while (1) {
      var4 = 0xFFFFFFFF;
      var5 = ((int *) var3)[652];
      if (var1 < 0)
      {

      label8:
        var9 = (var2 < var4);
      }
      else
      {
        var6 = ((int *) var5)[205];
        if (((var1 < var6)) == 0x00000000)
        {
          var9 = (var2 < 0xFFFFFFFF);
        }
        else
        {
          var7 = ((int *) var5)[216];
          var8 = ((int *) (var7 + (var1 << 0x00000002)))[0];
          var4 = ((int *) var8)[204];
          goto label8;
        }
      }
      if (var9 == 0x00000000)
        break;
      var10 = *((int *) 0x00047B20);
      var2 = var2 + 0x00000001;
      var13 = sub_1B68C (var10, var1, var2);
      var14 = var13;
      var15 = ((int *) var13)[2];
      if (var15 != arg1)
      {
        var3 = *((int *) 0x00047B20);
        continue;
      }
      else
      {
        var16 = *((int *) 0x00047B20);
        var17 = ((int *) var14)[3];
        if (var17 != arg2)
        {
          var3 = *((int *) 0x00047B20);
          continue;
        }
        else
        {
          var18 = *((int *) 0x00047B20);
          var19 = ((int *) var14)[0];
        }
      }
      goto label19;
    }
    var1 = var1 + 0x00000001;
    if (((var1 < 0x00000008)) != 0x00000000)
      continue;
    break;
  }
  var19 = 0xFFFFFFFF;

label19:
  ra = ((int *) sp)[6];
  var20 = ((int *) sp)[5];
  var21 = ((int *) sp)[4];
  var22 = ((int *) sp)[3];
  var23 = ((int *) sp)[2];
  var24 = ((int *) sp)[1];
  var25 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var19;
}

/**
 * Subroutine at address 0x000194D4
 */
int sub_194D4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  var1 = (((arg1 << 0x00000002) + arg1) << 0x00000003) + 0x000423BC;
  ((int *) sp)[0] = s0;
  var2 = ((int *) var1)[9];
  var3 = ((int *) var1)[8];
  if (arg1 == 0x00000002)
  {
    var10 = sub_193F4 (arg1, arg2);
    var2 = var10;
  }
  var4 = 0x80108202;
  if (!((var2 | var3) < 0))
  {
    ((int *) arg3)[0] = var3;
    var4 = 0x00000000;
    ((int *) arg4)[0] = var2;
  }
  ra = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00019560
 */
void sub_19560 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_176A8 (0x00000002);
  var3 = *((int *) 0x00047B20);
  ((char *) var3)[358] = 0x00000001;
  sub_1F268 (var3);
  var6 = *((int *) 0x00047B20);
  var7 = ((int *) var6)[93];
  ((int *) var6)[58] = var7;
  var10 = sub_1B644 (var6);
  var11 = *((int *) 0x00047B20);
  var12 = ((int *) var10)[3];
  var13 = ((int *) var11)[93];
  sub_12674 (var13, var12);
  var16 = *((int *) 0x00047B20);
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  var18 = ((int *) var16)[48];
  ((int *) var16)[48] = ((var18 & 0xFFFFFFFD) | (0x00000000 & 0x00000001));
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000195CC
 */
void sub_195CC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[61];
  sub_15138 (var2);
  var5 = *((int *) 0x00047B20);
  ((int *) var5)[61] = 0x00000001;
  ((int *) var5)[62] = 0x00000001;
  sub_19560 ();
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001960C
 */
void sub_1960C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  var2 = sp + 0x00000004;
  var3 = *((int *) 0x00047B20);
  var4 = ((int *) var3)[94];
  var5 = ((int *) var3)[93];
  var8 = sub_194D4 (var5, var4, var1, var2);
  if (var8 < 0)
  {
    sub_18F68 ();
    sub_18F80 ();
    sub_199EC ();
  }
  else
  {
    sub_18D94 ();
    sub_18E20 ();
    var13 = *((int *) 0x00047B20);
    var14 = ((int *) sp)[0];
    var15 = ((int *) sp)[1];
    __asm__ ("lwc1       $fpr12, 1416($v1);");
    var18 = sub_19278 (var14, var15);
    if (var18 < 0)
    {
      sub_176A8 (0x00000002);
      sub_18F68 ();
      sub_18F80 ();
      sub_199EC ();
    }
    else
    {
      var19 = *((int *) 0x00047B20);
      var20 = ((int *) var19)[58];
      if (var20 == 0x00000001)
      {

      label36:
        sub_19560 ();
      }
      else
      {
        var21 = ((int *) var19)[61];
        if (!(var20 == var21))
          goto label36;
        var27 = sub_1584C (0xFFFFFFFF);
        if (var27 == 0x00000000)
          goto label36;
        scePaf_2788491B (var27, 0x000195CC);
      }
    }
  }
  ra = ((int *) sp)[5];
  var24 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00019720
 */
void sub_19720 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[90];
  if (var2 == 0x00000000)
  {
    var21 = scePaf_ED055C3C (arg1, 0x0000007D);
    sub_1960C ();
    var24 = *((int *) 0x00047B20);
    var27 = sub_21E8C (var24, 0x00000000);
    ra = ((int *) sp)[1];
  }
  else
  {
    if (var2 < 0)
    {
      var6 = scePaf_ED055C3C (arg1, 0x0000007D);
      var7 = *((int *) 0x00047B20);
      var10 = sub_21E8C (var7, 0x00000000);
      var11 = *((int *) 0x00047B20);
      var12 = ((int *) var11)[90];
      sub_18F80 ();
      sub_18F68 ();
      sub_199EC ();
      ra = ((int *) sp)[1];
    }
    else
    {
      ra = ((int *) sp)[1];
    }
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000197B4
 */
void sub_197B4 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[16] = s4;
  var1 = arg3;
  var2 = sp + 0x00000020;
  ((int *) sp)[15] = s3;
  var3 = arg4;
  var4 = sp + 0x00000024;
  ((int *) sp)[17] = s5;
  var5 = arg6;
  ((int *) sp)[14] = s2;
  var6 = arg2;
  ((int *) sp)[13] = s1;
  var7 = arg1;
  ((int *) sp)[12] = s0;
  var8 = arg5;
  __asm__ ("swc1       $fpr20, 80($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[19] = ra;
  ((int *) sp)[18] = s6;
  var11 = sub_194D4 (arg1, arg2, var2, var4);
  if (var11 < 0)
  {
    if (!(var8 == 0x00000000))
    {
      var64 var65 = (*var8) (0x80108202, 0x00000000);
    }
  }
  else
  {
    var12 = *((int *) 0x00047B20);
    var13 = ((unsigned char *) var12)[364];
    var14 = var12;
    if (var13 == 0x00000000)
    {
      var35 = ((int *) var12)[92];
      ((char *) var12)[364] = 0x00000001;
      if (var35 <= 0)
      {
        ((int *) var12)[93] = var7;
        ((int *) var12)[94] = var6;
        ((int *) var12)[352] = var8;
        ((char *) var12)[364] = 0x00000000;
        ((int *) var12)[351] = var3;
        scePaf_3447707B ((var12 + 0x0000017C), var1, var3);
        var41 = *((int *) 0x00047B20);
        __asm__ ("swc1       $fpr20, 1416($v1);"
          : 
          : "=r"(var41));
        ((int *) var41)[353] = var5;
        sub_199D4 ();
        var44 = *((int *) 0x00047B20);
        var47 = sub_21E8C (var44, 0x00000001);
        var48 = sp;
        scePaf_4671AC75 (var48, 0x00000011, 0x00100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
        var51 = sp;
        scePaf_848E9F62 (var51, 0x00000001);
        var54 = *((int *) 0x00047B20);
        var55 = ((int *) var54)[58];
        sub_18FC8 (var55);
        var58 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr12;");
        var59 = ((int *) var58)[652];
        scePaf_485890F9 (var59, 0x0000007D, 0x00019720, 0x00000000);
        ((int *) sp)[0] = 0x00045458;

      label41:
      }
      else
      {
        ((int *) var12)[355] = var7;
        ((int *) var12)[356] = var6;
        ((int *) var12)[614] = var8;
        ((int *) var12)[613] = var3;
        scePaf_3447707B ((var12 + 0x00000594), var1, var3);
        var38 = *((int *) 0x00047B20);
        __asm__ ("swc1       $fpr20, 2464($v1);"
          : 
          : "=r"(var38));
        ((int *) var38)[615] = var5;
      }
    }
    else
    {
      var15 = ((int *) var12)[615];
      if (((var15 < var5)) != 0x00000000)
      {
        if (var8 == 0x00000000)
          goto label41;
        var33 var34 = (*var8) (0x80108201, 0x00000000);
      }
      else
      {
        var16 = ((int *) var12)[614];
        if (var16 != 0x00000000)
        {
          var29 var30 = (*var16) (0x80108201, 0x00000000);
          var14 = *((int *) 0x00047B20);
        }
        ((int *) var14)[355] = var7;
        ((int *) var14)[356] = var6;
        ((int *) var14)[614] = var8;
        ((int *) var14)[613] = var3;
        scePaf_3447707B ((var14 + 0x00000594), var1, var3);
        var19 = *((int *) 0x00047B20);
        __asm__ ("swc1       $fpr20, 2464($v1);"
          : 
          : "=r"(var19));
        ((int *) var19)[615] = var5;
        goto label41;
      }
    }
  }
  ra = ((int *) sp)[19];
  var20 = ((int *) sp)[18];
  var21 = ((int *) sp)[17];
  var22 = ((int *) sp)[16];
  var23 = ((int *) sp)[15];
  var24 = ((int *) sp)[14];
  var25 = ((int *) sp)[13];
  var26 = ((int *) sp)[12];
  __asm__ ("lwc1       $fpr20, 80($sp);");
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x000199D4
 */
void sub_199D4 ()
{
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[92];
  ((int *) var1)[92] = (var2 + 0x00000001);
  return;
}

/**
 * Subroutine at address 0x000199EC
 */
void sub_199EC ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[9] = ra;
  var2 = ((int *) var1)[92];
  var3 = var2 + 0xFFFFFFFF;
  ((int *) var1)[92] = var3;
  if (var3 <= 0)
  {
    var5 = ((unsigned char *) var1)[364];
    ((int *) var1)[92] = 0x00000000;
    if (!(var5 == 0x00000000))
    {
      ((char *) var1)[364] = 0x00000000;
      scePaf_3447707B ((var1 + 0x00000174), (var1 + 0x0000058C), 0x00000418);
      sub_199D4 ();
      var10 = *((int *) 0x00047B20);
      var13 = sub_21E8C (var10, 0x00000001);
      var14 = sp;
      scePaf_4671AC75 (var14, 0x00000011, 0x00100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      var17 = sp;
      scePaf_848E9F62 (var17, 0x00000001);
      var20 = *((int *) 0x00047B20);
      var21 = ((int *) var20)[58];
      sub_18FC8 (var21);
      var24 = *((int *) 0x00047B20);
      __asm__ ("mtc1       $zr, $fpr12;");
      var25 = ((int *) var24)[652];
      scePaf_485890F9 (var25, 0x0000007D, 0x00019720, 0x00000000);
      ((int *) sp)[0] = 0x00045458;
    }
  }
  ra = ((int *) sp)[9];
  var4 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00019AC0
 */
void sub_19AC0 ()
{
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[93];
  var3 = 0xFFFFFFFF;
  if (!(var2 <= 0))
  {
    var3 = ((int *) var1)[353];
  }
  return;
}

/**
 * Subroutine at address 0x00019AE0
 */
int sub_19AE0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0xFFFFFFFF;
  if (!(((arg1 < 0x00000003)) == 0x00000000))
  {
    scePaf_3447707B (arg2, ((arg1 * 0x0000028C) + 0x000428E4), 0x0000028C);
    var1 = 0x00000000;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x00019B30
 */
int sub_19B30 (int arg1)
{
  sp = sp + 0xFFFFFCB0;
  var1 = sp + 0x00000060;
  ((int *) sp)[209] = ra;
  ((int *) sp)[208] = s0;
  var4 = sub_19AE0 (arg1, var1);
  var5 = 0x00000000;
  if (!(var4 < 0))
  {
    var6 = ((int *) sp)[41];
    if ((var6 & 0x00000002) != 0x00000000)
    {
      var22 = sp + 0x000002F0;
      var23 = sp + 0x00000064;
      scePaf_15AFC8D3 (var22, 0x00000040, "flash3:%s", var23);
      var26 = sp;
      var29 = IoFileMgrForUser_ACE946E8 (var22, var26);
      var5 = 0x00000002;
      if (!(var29 >= 0))
      {
        var6 = ((int *) sp)[41];

      label13:
        if ((var6 & 0x00000001) != 0x00000000)
        {
          var8 = sp + 0x00000330;
          var11 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425823, 0x00000000, 0x00000000, var8, 0x00000004);
          var12 = var11;
          if (!(var11 < 0))
          {
            var13 = ((int *) sp)[204];
            var12 = ((var13 ^ 0x00000001) < 0x00000001);
          }
          if (var12 != 0x00000001)
          {
            var5 = 0x00000000;
          }
          else
          {
            var14 = sp + 0x000002F0;
            var15 = sp + 0x00000064;
            scePaf_15AFC8D3 (var14, 0x00000040, "ms0:%s", var15);
            var18 = sp;
            var21 = IoFileMgrForUser_ACE946E8 (var14, var18);
            var5 = 0x00000001;
            if (!(var21 >= 0))
            {
              var5 = 0x00000000;
            }
          }
        }
        else
        {
          var5 = 0x00000000;
        }
      }
    }
    else
    goto label13;
  }
  ra = ((int *) sp)[209];
  var7 = ((int *) sp)[208];
  sp = sp + 0x00000350;
  return var5;
}

/**
 * Subroutine at address 0x00019C2C
 */
void sub_19C2C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[892];
  sub_245DC (var2);
  var5 = *((int *) 0x00047B20);
  var6 = ((int *) var5)[652];
  scePaf_5A774BDC (var6, 0xFFFFFFFF, 0xFFFFFFFF);
  __asm__ ("mtc1       $zr, $fpr12;");
  sub_17F20 ();
  var11 = *((int *) 0x00047B20);
  __asm__ ("mov.s      $fpr20, $fpr00;");
  var12 = ((int *) var11)[60];
  sub_17F30 (var12);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_17F20 ();
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00019C98
 */
void sub_19C98 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sceUmdUser_46EBB729 ();
  if (var3 <= 0)
  {
  }
  else
  {
    var4 = *((int *) 0x00047B20);
    ((char *) var4)[284] = (arg1 & 0x000000FF);
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019CCC
 */
void sub_19CCC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  *((int *) 0x00047B1C) = arg1;
  var3 = scePaf_A78805B0 ("system_plugin");
  if (!(var3 == 0x00000000))
  {
    var6 = scePaf_4E87FDFC (var3, 0x00000001);
    if (!(var6 == 0x00000000))
    {
      var7 = ((int *) var6)[13];
      var8 = *((int *) 0x00047B1C);
      var11 var12 = (*var7) (var8);
      var13 = ((int *) var6)[14];
      var14 = *((int *) 0x00047B1C);
      var17 var18 = (*var13) (var14);
    }
  }
  var19 = *((int *) 0x00047B1C);
  ((int *) var19)[48] = 0x00000000;
  ((int *) var19)[49] = 0x00000000;
  ((int *) var19)[47] = 0x00000000;
  ((int *) var19)[42] = 0x00000000;
  scePaf_904D869C (var19, 0x00045690);
  var22 = *((int *) 0x00047B1C);
  scePaf_918CB54A (var22, 0x00000001, 0x00045740);
  sub_17050 (0x00000000);
  ra = ((int *) sp)[2];
  var27 = ((int *) sp)[1];
  var28 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019D7C
 */
void sub_19D7C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B1C);
  ((int *) sp)[1] = ra;
  scePaf_27F4E35C (var1, "page_topmenu", 0x00000002, 0x00000000);
  var4 = *((int *) 0x00047B1C);
  scePaf_27F4E35C (var4, "page_content_info_bg", 0x00000002, 0x00000000);
  var7 = *((int *) 0x00047B1C);
  scePaf_27F4E35C (var7, "page_content_info_fg", 0x00000002, 0x00000000);
  var10 = *((int *) 0x00047B1C);
  scePaf_27F4E35C (var10, "page_dialog", 0x00000002, 0x00000000);
  ra = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019DFC
 */
void sub_19DFC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    sub_1A4AC (var1);
    scePaf_4508F2FA (var1);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019E40
 */
void sub_19E40 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[29] = s1;
  var1 = arg1;
  ((int *) arg1)[90] = 0x00000001;
  ((int *) arg1)[652] = arg3;
  ((int *) sp)[36] = ra;
  ((int *) sp)[33] = s5;
  var2 = arg1 + 0x00000A54;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  var3 = 0x00000007;
  ((int *) sp)[30] = s2;
  var4 = var1 + 0x00000DF8;
  ((int *) sp)[28] = s0;
  ((int *) var1)[58] = 0x00000001;
  ((int *) var1)[61] = 0x00000001;
  ((int *) var1)[62] = 0x00000001;
  ((char *) var1)[284] = 0x00000001;
  ((char *) var1)[355] = 0x00000001;
  ((int *) sp)[35] = s7;
  ((int *) sp)[34] = s6;
  ((int *) var1)[59] = 0x00000000;
  ((int *) var1)[60] = 0x00000000;
  ((char *) var1)[272] = 0x00000000;
  ((char *) var1)[273] = 0x00000000;
  ((char *) var1)[274] = 0x00000000;
  ((char *) var1)[275] = 0x00000000;
  ((char *) var1)[276] = 0x00000000;
  ((int *) var1)[70] = 0x00000000;
  ((char *) var1)[285] = 0x00000000;
  ((char *) var1)[352] = 0x00000000;
  ((char *) var1)[353] = 0x00000000;
  ((char *) var1)[354] = 0x00000000;
  ((char *) var1)[356] = 0x00000000;
  ((char *) var1)[357] = 0x00000000;
  ((char *) var1)[358] = 0x00000000;
  ((char *) var1)[364] = 0x00000000;
  ((int *) var1)[92] = 0x00000000;
  ((int *) var1)[651] = 0x00000000;
  ((int *) var1)[653] = 0x00000000;
  sub_22DFC (var2);
  ((int *) var1)[893] = arg2;
  ((int *) var1)[882] = 0x00000000;
  ((int *) var1)[883] = 0x00000000;
  ((int *) var1)[884] = 0x00000000;
  ((int *) var1)[885] = 0x00000000;
  ((int *) var1)[886] = 0x00000000;
  ((int *) var1)[887] = 0x00000000;
  ((int *) var1)[888] = 0x00000000;
  ((int *) var1)[891] = 0x00000000;
  ((int *) var1)[892] = 0x00000000;
  while (1) {
    var7 = sp;
    var3 = var3 + 0xFFFFFFFF;
    sub_337F0 (var4);
    var4 = var4 + 0x0000000C;
    if (var3 != 0xFFFFFFFF)
      continue;
    break;
  }
  var10 = var1 + 0x00000E60;
  ((int *) var10)[3] = 0x00000000;
  ((int *) var1)[93] = 0xFFFFFFFF;
  ((char *) var1)[3672] = 0x00000000;
  ((char *) var1)[3673] = 0x00000000;
  ((char *) var1)[3674] = 0x00000000;
  ((int *) var1)[920] = 0x00000000;
  ((int *) var10)[1] = 0x00000000;
  ((int *) var10)[2] = 0x00000000;
  ((int *) var1)[352] = 0x00000000;
  scePaf_6439FDBC ((var1 + 0x000000BC), 0x00000000, 0x0000002C);
  vsh_B643726A (0x0000000A, (var1 + 0x00000DE4), 0x00000008);
  var17 = scePaf_A78805B0 ("system_plugin");
  ((int *) var1)[651] = var17;
  if (var17 != 0x00000000)
  {
    var62 = sp + 0x00000010;
    scePaf_047C9996 (var62, var17, "tex_playing");
    var65 = ((int *) var1)[651];
    var66 = sp + 0x00000020;
    scePaf_047C9996 (var66, var65, "tex_playing_shadow");
    var69 = 0xC1D00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1D00000));
    var70 = ((int *) var1)[652];
    __asm__ ("swc1       $fpr00, 48($sp);"
      : 
      : "=r"(sp));
    var71 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    var72 = sp + 0x00000030;
    __asm__ ("swc1       $fpr00, 52($sp);"
      : 
      : "=r"(sp));
    var73 = sp + 0x00000040;
    var74 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 60($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var75 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[14] = 0x00000000;
    __asm__ ("swc1       $fpr00, 64($sp);"
             "swc1       $fpr00, 68($sp);"
             "swc1       $fpr00, 72($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    scePaf_8A03CEAB (var70, 0x00000001, var62, var66, var72, var73, 0x0000003C, 0x0000001E);
    var78 = ((int *) sp)[8];
    if (var78 == 0x00000000)
    {
      var81 = ((int *) sp)[4];
    }
    else
    {
      var79 = ((int *) var78)[1];
      var80 = var79 + 0xFFFFFFFF;
      ((int *) var78)[1] = var80;
      if (var80 <= 0)
      {
        var191 = ((int *) var78)[0];
        var192 = ((int *) var191)[1];
        var195 var196 = (*var192) (var78);
        var81 = ((int *) sp)[4];
      }
      else
      {
        var81 = ((int *) sp)[4];
      }
    }
    if (var81 == 0x00000000)
    {
      var190 = ((int *) var1)[651];
    }
    else
    {
      var82 = ((int *) var81)[1];
      var83 = var82 + 0xFFFFFFFF;
      ((int *) var81)[1] = var83;
      if (var83 <= 0)
      {
        var183 = ((int *) var81)[0];
        var184 = ((int *) var183)[1];
        var187 var188 = (*var184) (var81);
        var189 = ((int *) var1)[651];
      }
      else
      {
        var84 = ((int *) var1)[651];
      }
    }
    scePaf_047C9996 (var66, var84, "tex_playing");
    var87 = ((int *) var1)[651];
    scePaf_047C9996 (var62, var87, "tex_playing_shadow");
    var90 = 0xC1D00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1D00000));
    var91 = ((int *) var1)[652];
    __asm__ ("swc1       $fpr00, 64($sp);"
      : 
      : "=r"(sp));
    var92 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    __asm__ ("swc1       $fpr00, 68($sp);"
      : 
      : "=r"(sp));
    var93 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    var94 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[18] = 0x00000000;
    __asm__ ("swc1       $fpr00, 48($sp);"
             "swc1       $fpr00, 52($sp);"
             "swc1       $fpr00, 56($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 60($sp);"
      : 
      : "=r"(sp));
    scePaf_8A03CEAB (var91, 0x00000002, var66, var62, var73, var72, 0x0000003C, 0x0000001E);
    var97 = ((int *) sp)[4];
    if (var97 == 0x00000000)
    {
      var100 = ((int *) sp)[8];
    }
    else
    {
      var98 = ((int *) var97)[1];
      var99 = var98 + 0xFFFFFFFF;
      ((int *) var97)[1] = var99;
      if (var99 <= 0)
      {
        var177 = ((int *) var97)[0];
        var178 = ((int *) var177)[1];
        var181 var182 = (*var178) (var97);
        var100 = ((int *) sp)[8];
      }
      else
      {
        var100 = ((int *) sp)[8];
      }
    }
    if (var100 == 0x00000000)
    {
      var176 = ((int *) var1)[651];
    }
    else
    {
      var101 = ((int *) var100)[1];
      var102 = var101 + 0xFFFFFFFF;
      ((int *) var100)[1] = var102;
      if (var102 <= 0)
      {
        var169 = ((int *) var100)[0];
        var170 = ((int *) var169)[1];
        var173 var174 = (*var170) (var100);
        var175 = ((int *) var1)[651];
      }
      else
      {
        var103 = ((int *) var1)[651];
      }
    }
    scePaf_047C9996 (var66, var103, "tex_playing");
    var106 = ((int *) var1)[651];
    scePaf_047C9996 (var62, var106, "tex_playing_shadow");
    var109 = 0xC1D00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1D00000));
    var110 = ((int *) var1)[652];
    __asm__ ("swc1       $fpr00, 64($sp);"
      : 
      : "=r"(sp));
    var111 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    __asm__ ("swc1       $fpr00, 68($sp);"
      : 
      : "=r"(sp));
    var112 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    var113 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[18] = 0x00000000;
    __asm__ ("swc1       $fpr00, 48($sp);"
             "swc1       $fpr00, 52($sp);"
             "swc1       $fpr00, 56($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 60($sp);"
      : 
      : "=r"(sp));
    scePaf_8A03CEAB (var110, 0x00000003, var66, var62, var73, var72, 0x0000003C, 0x0000001E);
    var116 = ((int *) sp)[4];
    if (var116 == 0x00000000)
    {
      var119 = ((int *) sp)[8];
    }
    else
    {
      var117 = ((int *) var116)[1];
      var118 = var117 + 0xFFFFFFFF;
      ((int *) var116)[1] = var118;
      if (var118 <= 0)
      {
        var163 = ((int *) var116)[0];
        var164 = ((int *) var163)[1];
        var167 var168 = (*var164) (var116);
        var119 = ((int *) sp)[8];
      }
      else
      {
        var119 = ((int *) sp)[8];
      }
    }
    if (var119 == 0x00000000)
    {
      var162 = ((int *) var1)[651];
    }
    else
    {
      var120 = ((int *) var119)[1];
      var121 = var120 + 0xFFFFFFFF;
      ((int *) var119)[1] = var121;
      if (var121 <= 0)
      {
        var155 = ((int *) var119)[0];
        var156 = ((int *) var155)[1];
        var159 var160 = (*var156) (var119);
        var161 = ((int *) var1)[651];
      }
      else
      {
        var122 = ((int *) var1)[651];
      }
    }
    scePaf_047C9996 (var66, var122, "tex_playing");
    var125 = ((int *) var1)[651];
    scePaf_047C9996 (var62, var125, "tex_playing_shadow");
    var128 = 0xC1F00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1F00000));
    var129 = ((int *) var1)[652];
    __asm__ ("swc1       $fpr00, 64($sp);"
      : 
      : "=r"(sp));
    var130 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    __asm__ ("swc1       $fpr00, 68($sp);"
      : 
      : "=r"(sp));
    var131 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    var132 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[18] = 0x00000000;
    __asm__ ("swc1       $fpr00, 48($sp);"
             "swc1       $fpr00, 52($sp);"
             "swc1       $fpr00, 56($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 60($sp);"
      : 
      : "=r"(sp));
    scePaf_8A03CEAB (var129, 0x00000006, var66, var62, var73, var72, 0x0000003C, 0x0000001E);
    var135 = ((int *) sp)[4];
    if (var135 == 0x00000000)
    {
      var138 = ((int *) sp)[8];
    }
    else
    {
      var136 = ((int *) var135)[1];
      var137 = var136 + 0xFFFFFFFF;
      ((int *) var135)[1] = var137;
      if (var137 <= 0)
      {
        var149 = ((int *) var135)[0];
        var150 = ((int *) var149)[1];
        var153 var154 = (*var150) (var135);
        var138 = ((int *) sp)[8];
      }
      else
      {
        var138 = ((int *) sp)[8];
      }
    }
    if (var138 == 0x00000000)
    {
      var148 = ((int *) var1)[651];
    }
    else
    {
      var139 = ((int *) var138)[1];
      var140 = var139 + 0xFFFFFFFF;
      ((int *) var138)[1] = var140;
      if (var140 > 0)
      {

      label94:
        var18 = ((int *) var1)[651];
      }
      else
      {
        var141 = ((int *) var138)[0];
        var142 = ((int *) var141)[1];
        var145 var146 = (*var142) (var138);
        var147 = ((int *) var1)[651];
      }
    }
  }
  else
  goto label94;
  var21 = scePaf_4E87FDFC (var18, 0x00000001);
  ((int *) var1)[882] = var21;
  var22 = ((int *) var1)[893];
  var25 = scePaf_4E87FDFC (var22, 0x00000001);
  ((int *) var1)[883] = var25;
  sub_21448 (var1, var2);
  sub_21424 (var1);
  var30 = var1;
  var31 = 0x00000020;
  while (1) {
    var31 = var31 + 0xFFFFFFFF;
    ((int *) var30)[0] = 0x00000000;
    var30 = var30 + 0x00000004;
    if (var31 >= 0)
      continue;
    break;
  }
  var32 = var1 + 0x00000080;
  var33 = 0x00000006;
  while (1) {
    var33 = var33 + 0xFFFFFFFF;
    ((int *) var32)[1] = 0x00000000;
    ((int *) var32)[2] = 0x00000000;
    var32 = var32 + 0x00000008;
    if (var33 >= 0)
      continue;
    break;
  }
  var34 = sp + 0x00000050;
  scePaf_39374DDC (0x00043CF4, 0x000001E0, var34);
  var39 = scePaf_B6ADE52D (var34, 0x000454F0, 0x00000014);
  if (var39 != 0x00000000)
  {
    var61 = scePaf_D6E29A9E (0x00043CF4, 0x000001E0, 0x00045510, 0x00000000);
  }
  else
  {
  }
  var40 = var1;
  var41 = 0x00000007;
  while (1) {
    var41 = var41 + 0xFFFFFFFF;
    ((int *) var40)[72] = 0x0000002A;
    ((int *) var40)[80] = 0x00000001;
    var40 = var40 + 0x00000004;
    if (var41 >= 0)
      continue;
    break;
  }
  ((int *) var1)[63] = 0x00000000;
  var42 = var1;
  var43 = 0x00000001;
  var44 = 0x42C7CCCD;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x42C7CCCD));
  while (1) {
    var43 = var43 + 0xFFFFFFFF;
    ((int *) var42)[64] = 0x00000000;
    __asm__ ("swc1       $fpr00, 264($v0);"
      : 
      : "=r"(var42));
    var42 = var42 + 0x00000004;
    if (var43 >= 0)
      continue;
    break;
  }
  var47 = scePaf_48BB05D5 (0x00000040);
  var48 = ((int *) var1)[652];
  sub_22EB0 (var47, var48);
  ((int *) var1)[892] = var47;
  ra = ((int *) sp)[36];
  var51 = ((int *) sp)[35];
  var52 = ((int *) sp)[34];
  var53 = ((int *) sp)[33];
  var54 = ((int *) sp)[32];
  var55 = ((int *) sp)[31];
  var56 = ((int *) sp)[30];
  var57 = ((int *) sp)[29];
  var58 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0001A4AC
 */
void sub_1A4AC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[892];
  var2 = arg1;
  if (var1 != 0x00000000)
  {
    sub_22F60 (var1);
    scePaf_4508F2FA (var1);
    ((int *) var2)[892] = 0x00000000;
  }
  var3 = ((int *) var2)[653];
  if (var3 != 0x00000000)
  {
    vsh_489F6A4F (var3);
    scePaf_4508F2FA (var3);
    ((int *) var2)[653] = 0x00000000;
  }
  sub_21B28 (var2);
  var6 = ((int *) var2)[63];
  ((char *) var2)[3556] = 0x00000001;
  ((int *) var2)[890] = var6;
  vsh_B5C7E005 (0x0000000A);
  sub_1D310 (var2, 0x00000002, 0x00000002);
  sub_1D310 (var2, 0x00000003, 0x00000002);
  sub_1D310 (var2, 0x00000005, 0x00000002);
  sub_1D310 (var2, 0x00000006, 0x00000002);
  sub_1D310 (var2, 0x00000001, 0x00000003);
  sub_1D310 (var2, 0x00000002, 0x00000003);
  sub_1D310 (var2, 0x00000003, 0x00000003);
  sub_1D310 (var2, 0x00000005, 0x00000003);
  var25 = var2 + 0x00000E58;
  if (!(var2 == 0xFFFFF208))
  {
    while (1) {
      if ((var2 + 0x00000DF8) == var25)
        break;
      var25 = var25 + 0xFFFFFFF4;
      sub_3382C (var25);
      continue;
    }
  }
  var28 = var2 + 0x00000A54;
  if (!(var28 == 0xFFFFFD4C))
  {
    var29 = var2 + 0x00000DC8;
    while (1) {
      if ((var2 + 0x00000D08) == var29)
        break;
      var29 = var29 + 0xFFFFFFF0;
      sub_335E8 ((var29 + 0x00000004));
      continue;
    }
  }
  var32 = var28 + 0x000002A0;
  sub_335E8 (var32);
  if (!(var28 == 0xFFFFFE20))
  {
    while (1) {
      if ((var28 + 0x000001E0) == var32)
        break;
      var32 = var32 + 0xFFFFFFF0;
      sub_335E8 ((var32 + 0x00000004));
      continue;
    }
  }
  var37 = var28 + 0x000001C4;
  sub_335E8 (var37);
  if (!(var28 == 0xFFFFFEFC))
  {
    while (1) {
      if ((var28 + 0x00000104) == var37)
        break;
      var37 = var37 + 0xFFFFFFF0;
      sub_335E8 ((var37 + 0x00000004));
      continue;
    }
  }
  var42 = var28 + 0x000000E8;
  sub_335E8 (var42);
  if (!(var28 == 0xFFFFFFD8))
  {
    while (1) {
      if ((var28 + 0x00000028) == var42)
        break;
      var42 = var42 + 0xFFFFFFF0;
      sub_335E8 ((var42 + 0x00000004));
      continue;
    }
  }
  sub_335E8 ((var28 + 0x0000000C));
  ra = ((int *) sp)[4];
  var49 = ((int *) sp)[3];
  var50 = ((int *) sp)[2];
  var51 = ((int *) sp)[1];
  var52 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001A6BC
 */
void sub_1A6BC (int arg1)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[37] = ra;
  ((int *) sp)[30] = s2;
  var1 = arg1;
  ((int *) sp)[36] = fp;
  ((int *) sp)[35] = s7;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  var4 = vsh_E261B0EE ();
  ((int *) sp)[21] = var4;
  var7 = sceVshBridge_2EB0812A ();
  ((int *) sp)[22] = var7;
  sceVshBridge_73C84D1F (0x00000001, 0x00000002);
  sceVshBridge_263DDFCF (0x00000001, 0x00000002);
  sub_1EC0C (var1);
  var14 = ((int *) var1)[652];
  var15 = ((int *) var14)[0];
  var16 = ((int *) var15)[28];
  var19 var20 = (*var16) (var14, 0x00FF0048, 0x00000001);
  var21 = ((int *) var1)[652];
  var22 = 0x42800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 4($sp);"
    : 
    : "=r"(0x42800000), "=r"(sp));
  var23 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  var24 = ((int *) var21)[0];
  ((int *) sp)[0] = 0x00000000;
  var25 = sp;
  var26 = ((int *) var24)[30];
  __asm__ ("swc1       $fpr00, 8($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var29 var30 = (*var26) (var21, 0x0600004E, var25);
  var31 = ((int *) sp)[21];
  if (!(var31 == 0x00000006))
  {
    var32 = ((int *) var1)[652];
    var33 = ((int *) var32)[0];
    var34 = ((int *) var33)[28];
    var37 var38 = (*var34) (var32, 0x04FF0048, 0x00000002);
  }
  var39 = ((int *) var1)[652];
  var40 = 0x40BB3333;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x40BB3333));
  var41 = ((int *) var39)[0];
  var42 = ((int *) var41)[33];
  var43 = 0x00000000;
  var46 var47 = (*var42) (var39, 0x0700001A, 0x0000001C);
  var48 = ((int *) var1)[892];
  sub_2516C (var48);
  __asm__ ("mtc1       $zr, $fpr12;");
  var51 = ((int *) var1)[652];
  __asm__ ("mov.s      $fpr13, $fpr12;");
  scePaf_043C75D2 (var51);
  var54 = ((int *) var1)[652];
  while (1) {
    __asm__ ("mtc1       $zr, $fpr12;");
    var55 = ((int *) var54)[216];
    var43 = var43 + 0x00000001;
    __asm__ ("mov.s      $fpr13, $fpr12;");
    var56 = ((int *) (var55 + (var43 << 0x00000002)))[0];
    __asm__ ("mov.s      $fpr14, $fpr12;");
    scePaf_8906478F (var56);
    if (!(((var43 < 0x00000008)) != 0x00000000))
      break;
    var54 = ((int *) var1)[652];
    continue;
  }
  var59 = ((int *) sp)[22];
  var60 = 0x00043CF4;
  var61 = ((int *) sp)[21];
  var62 = 0x0000001D;
  while (1) {
    var63 = ((int *) var60)[3];
    if ((var63 & (0x00000001 << var61)) != 0x00000000)
    {
      var337 = ((int *) var60)[2];
      if ((var337 & (0x00000001 << var59)) == 0x00000000)
      {
        var62 = var62 + 0xFFFFFFFF;
      }
      else
      {
        var338 = ((int *) var60)[1];
        if (var338 == 0x0000001F)
        {
          var345 = ((int *) var60)[0];
          if (var345 != 0x00000004)
          {
            var62 = var62 + 0xFFFFFFFF;
          }
          else
          {

          label40:
            if (var338 == 0x00000027)
            {
              var344 = ((int *) var60)[0];
              if (var344 != 0x00000004)
              {
                var62 = var62 + 0xFFFFFFFF;
              }
              else
              {

              label45:
                if (var338 == 0x0000001E)
                {
                  var343 = ((int *) var60)[0];
                  if (var343 != 0x00000006)
                  {
                    var62 = var62 + 0xFFFFFFFF;
                  }
                  else
                  {

                  label50:
                    if (var338 == 0x00000028)
                    {
                      var62 = var62 + 0xFFFFFFFF;
                    }
                    else
                    {
                      var339 = ((int *) var60)[0];
                      var342 = sub_1C468 (var1, var339, ((var338 * 0x0000008C) + 0x000457A0));
                      var62 = var62 + 0xFFFFFFFF;
                    }
                  }
                }
                else
                goto label50;
              }
            }
            else
            goto label45;
          }
        }
        else
        goto label40;
      }
    }
    else
    {
      var62 = var62 + 0xFFFFFFFF;
    }
    var60 = var60 + 0x00000010;
    if (var62 >= 0)
      continue;
    break;
  }
  var64 = sp + 0x00000050;
  var67 = sceVshBridge_16C1E82E (var64, 0x00000000);
  var68 = ((int *) sp)[22];
  if (!(var67 != 0x00000000))
  {
    var69 = ((unsigned char *) sp)[80];
    if ((var69 & 0x00000001) != 0x00000000)
    {
      var336 = sub_1C468 (var1, 0x00000000, 0x00046D80);
      var68 = ((int *) sp)[22];
    }
  }
  var70 = ((int *) sp)[21];
  ((int *) sp)[23] = 0x00000000;
  var71 = 0x00000000;
  var72 = 0x00043CF4;
  while (1) {
    var73 = ((int *) var72)[3];
    var71 = var71 + 0x00000001;
    if ((var73 & (0x00000001 << var70)) != 0x00000000)
    {
      var330 = ((int *) var72)[2];
      if ((var330 & (0x00000001 << var68)) == 0x00000000)
      {

      label69:
        var72 = var72 + 0x00000010;
        if (((var71 < 0x0000001E)) != 0x00000000)
          continue;
        break;
      }
      else
      {
        var331 = ((int *) var72)[1];
        var332 = ((int *) sp)[23];
        if (var331 == 0x00000018)
          break;
        var333 = ((int *) var72)[0];
        ((int *) sp)[23] = (var332 + (((var333 ^ 0x00000006) < 0x00000001)));
        goto label69;
      }
    }
    else
    goto label69;
  }
  var74 = ((int *) sp)[23];
  if (var74 != 0x00000000)
  {
  }
  else
  {
    var75 = ((int *) var1)[652];
    var76 = ((int *) var75)[205];
    var77 = 0xFFFFFFFF;
    if (!(((0x00000006 < var76)) == 0x00000000))
    {
      var78 = ((int *) var75)[216];
      var79 = ((int *) var78)[6];
      var77 = ((int *) var79)[204];
    }
    ((int *) sp)[23] = (var77 + 0xFFFFFFFF);
  }
  sub_1EEBC (var1);
  var82 = ((int *) var1)[652];
  var83 = ((int *) var82)[205];
  var84 = 0x00000000;
  if (!(var83 <= 0))
  {
    ((int *) sp)[24] = 0x00000000;
    var85 = sp + 0x00000010;
    var86 = sp + 0x00000020;
    var87 = 0x00000000;
    var88 = 0x00000000;
    var89 = 0x00000000;
    while (1) {
      sub_32328 (var85, 0x00000000);
      var92 = ((int *) var1)[892];
      sub_23B40 (var86, var92, (var89 + "tex_system"));
      var95 = ((int *) var1)[652];
      var96 = var84 << 0x00000018;
      var97 = ((int *) var95)[0];
      var98 = ((int *) var97)[43];
      var101 var102 = (*var98) (var95, var86, (var96 | 0x00000019));
      var103 = ((int *) sp)[8];
      var104 = ((int *) sp)[24];
      if (!(var103 == 0x00000000))
      {
        var105 = ((int *) var103)[1];
        var106 = var105 + 0xFFFFFFFF;
        ((int *) var103)[1] = var106;
        if (var106 <= 0)
        {
          var324 = ((int *) var103)[0];
          var325 = ((int *) var324)[1];
          var328 var329 = (*var325) (var103);
          var104 = ((int *) sp)[24];
        }
        else
        {
          var104 = ((int *) sp)[24];
        }
      }
      var107 = ((int *) var1)[892];
      sub_23B40 (var86, var107, (var104 + "tex_sdwn_system"));
      var110 = ((int *) sp)[8];
      sub_32448 (var85, var110);
      var113 = ((int *) sp)[8];
      var114 = ((int *) sp)[4];
      if (!(var113 == 0x00000000))
      {
        var115 = ((int *) var113)[1];
        var116 = var115 + 0xFFFFFFFF;
        ((int *) var113)[1] = var116;
        if (var116 <= 0)
        {
          var318 = ((int *) var113)[0];
          var319 = ((int *) var318)[1];
          var322 var323 = (*var319) (var113);
          var114 = ((int *) sp)[4];
        }
        else
        {
          var114 = ((int *) sp)[4];
        }
      }
      if (var114 != 0x00000000)
      {
        var298 = ((int *) var1)[652];
        var299 = var96 | 0x0000001E;
        var300 = ((int *) var298)[0];
        var301 = ((int *) var300)[43];
        var304 var305 = (*var301) (var298, var85, var299);
        var306 = ((int *) sp)[4];
        var307 = ((int *) var1)[652];
        ((int *) var1)[922] = 0x00000000;
        var308 = ((short *) var306)[13];
        var309 = ((short *) var306)[12];
        var310 = ((int *) var307)[0];
        var311 = var308 << 0x00000001;
        var312 = var309 << 0x00000001;
        __asm__ ("mtc1       $v0, $fpr1;"
                 "mtc1       $v1, $fpr0;"
          : 
          : "=r"(var311), "=r"(var312));
        var313 = ((int *) var310)[34];
        __asm__ ("cvt.s.w    $fpr03, $fpr01;"
                 "cvt.s.w    $fpr02, $fpr00;");
        __asm__ ("swc1       $fpr03, 3684($s2);"
          : 
          : "=r"(var1));
        __asm__ ("swc1       $fpr02, 3680($s2);"
          : 
          : "=r"(var1));
        var316 var317 = (*var313) (var307, var299, 0x00000012, (var1 + 0x00000E60), var310);
      }
      else
      {
      }
      var117 = ((int *) var1)[892];
      sub_23B40 (var86, var117, (var88 + "tex_sdwf_system"));
      var120 = ((int *) sp)[8];
      sub_32448 (var85, var120);
      var123 = ((int *) sp)[8];
      var124 = ((int *) sp)[4];
      if (!(var123 == 0x00000000))
      {
        var125 = ((int *) var123)[1];
        var126 = var125 + 0xFFFFFFFF;
        ((int *) var123)[1] = var126;
        if (var126 <= 0)
        {
          var292 = ((int *) var123)[0];
          var293 = ((int *) var292)[1];
          var296 var297 = (*var293) (var123);
          var124 = ((int *) sp)[4];
        }
        else
        {
          var124 = ((int *) sp)[4];
        }
      }
      if (var124 != 0x00000000)
      {
        var272 = ((int *) var1)[652];
        var273 = var96 | 0x0000001F;
        var274 = ((int *) var272)[0];
        var275 = ((int *) var274)[43];
        var278 var279 = (*var275) (var272, var85, var273);
        var280 = ((int *) sp)[4];
        var281 = ((int *) var1)[652];
        ((int *) var1)[922] = 0x00000000;
        var282 = ((short *) var280)[13];
        var283 = ((short *) var280)[12];
        var284 = ((int *) var281)[0];
        var285 = var282 << 0x00000001;
        var286 = var283 << 0x00000001;
        __asm__ ("mtc1       $v0, $fpr1;"
                 "mtc1       $v1, $fpr0;"
          : 
          : "=r"(var285), "=r"(var286));
        var287 = ((int *) var284)[34];
        __asm__ ("cvt.s.w    $fpr03, $fpr01;"
                 "cvt.s.w    $fpr02, $fpr00;");
        __asm__ ("swc1       $fpr03, 3684($s2);"
          : 
          : "=r"(var1));
        __asm__ ("swc1       $fpr02, 3680($s2);"
          : 
          : "=r"(var1));
        var290 var291 = (*var287) (var281, var273, 0x00000012, (var1 + 0x00000E60), var284);
      }
      else
      {
      }
      var127 = ((int *) var1)[893];
      var130 = scePaf_970DC20D (var127, (var87 + "msgshare_settings"));
      var131 = sp + 0x00000030;
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      sub_33618 (var131, var130);
      var134 = ((int *) var1)[652];
      var135 = ((int *) var134)[0];
      var136 = ((int *) var135)[45];
      var137 = sp + 0x00000030;
      var140 var141 = (*var136) (var134, var137, (var96 | 0x00000027));
      var142 = sp + 0x00000030;
      sub_335E8 (var142);
      var145 = ((int *) var1)[651];
      scePaf_047C9996 (var86, var145, "tex_arrow_left");
      var148 = ((int *) var1)[652];
      var149 = ((int *) var148)[0];
      var150 = ((int *) var149)[43];
      var153 var154 = (*var150) (var148, var86, (var96 | 0x0000001C));
      var155 = ((int *) sp)[8];
      if (var155 == 0x00000000)
      {
        var271 = ((int *) var1)[651];
      }
      else
      {
        var156 = ((int *) var155)[1];
        var157 = var156 + 0xFFFFFFFF;
        ((int *) var155)[1] = var157;
        if (var157 <= 0)
        {
          var264 = ((int *) var155)[0];
          var265 = ((int *) var264)[1];
          var268 var269 = (*var265) (var155);
          var270 = ((int *) var1)[651];
        }
        else
        {
          var158 = ((int *) var1)[651];
        }
      }
      scePaf_047C9996 (var86, var158, "tex_arrow_left_shadow");
      var161 = ((int *) var1)[652];
      var162 = ((int *) var161)[0];
      var163 = ((int *) var162)[43];
      var166 var167 = (*var163) (var161, var86, (var96 | 0x0000001D));
      var168 = ((int *) sp)[8];
      if (var168 == 0x00000000)
      {
        var171 = ((int *) sp)[4];
      }
      else
      {
        var169 = ((int *) var168)[1];
        var170 = var169 + 0xFFFFFFFF;
        ((int *) var168)[1] = var170;
        if (var170 <= 0)
        {
          var258 = ((int *) var168)[0];
          var259 = ((int *) var258)[1];
          var262 var263 = (*var259) (var168);
          var171 = ((int *) sp)[4];
        }
        else
        {
          var171 = ((int *) sp)[4];
        }
      }
      if (var171 == 0x00000000)
      {
        var174 = ((int *) var1)[652];
      }
      else
      {
        var172 = ((int *) var171)[1];
        var173 = var172 + 0xFFFFFFFF;
        ((int *) var171)[1] = var173;
        if (var173 <= 0)
        {
          var252 = ((int *) var171)[0];
          var253 = ((int *) var252)[1];
          var256 var257 = (*var253) (var171);
          var174 = ((int *) var1)[652];
        }
        else
        {
          var174 = ((int *) var1)[652];
        }
      }
      var175 = ((int *) sp)[24];
      var84 = var84 + 0x00000001;
      var176 = ((int *) var174)[205];
      var89 = var89 + 0x00000048;
      ((int *) sp)[24] = (var175 + 0x00000048);
      var88 = var88 + 0x00000048;
      var87 = var87 + 0x00000048;
      if (((var84 < var176)) != 0x00000000)
        continue;
      break;
    }
  }
  var177 = ((int *) var1)[652];
  scePaf_1F166C10 (var177, 0x00000000, 0x00000002);
  var180 = ((int *) var1)[652];
  var181 = ((int *) var180)[205];
  var182 = 0xFFFFFFFF;
  if (!(((0x00000001 < var181)) == 0x00000000))
  {
    var183 = ((int *) var180)[216];
    var184 = ((int *) var183)[1];
    var182 = ((int *) var184)[204];
    var185 = ((int *) var1)[652];
  }
  scePaf_1F166C10 (var185, 0x00000001, (var182 + 0xFFFFFFFF));
  var188 = ((int *) var1)[652];
  var189 = ((int *) var188)[205];
  var190 = 0xFFFFFFFF;
  if (!(((0x00000002 < var189)) == 0x00000000))
  {
    var191 = ((int *) var188)[216];
    var192 = ((int *) var191)[2];
    var190 = ((int *) var192)[204];
    var193 = ((int *) var1)[652];
  }
  scePaf_1F166C10 (var193, 0x00000002, (var190 + 0xFFFFFFFF));
  var196 = ((int *) var1)[652];
  var197 = ((int *) var196)[205];
  var198 = 0xFFFFFFFF;
  if (!(((0x00000003 < var197)) == 0x00000000))
  {
    var199 = ((int *) var196)[216];
    var200 = ((int *) var199)[3];
    var198 = ((int *) var200)[204];
    var201 = ((int *) var1)[652];
  }
  scePaf_1F166C10 (var201, 0x00000003, (var198 + 0xFFFFFFFF));
  var204 = ((int *) var1)[652];
  scePaf_1F166C10 (var204, 0x00000004, 0x00000000);
  var207 = ((int *) var1)[652];
  var208 = ((int *) var207)[205];
  var209 = 0xFFFFFFFF;
  if (!(((0x00000005 < var208)) == 0x00000000))
  {
    var210 = ((int *) var207)[216];
    var211 = ((int *) var210)[5];
    var209 = ((int *) var211)[204];
    var212 = ((int *) var1)[652];
  }
  scePaf_1F166C10 (var212, 0x00000005, (var209 + 0xFFFFFFFF));
  var215 = ((int *) var1)[652];
  var216 = ((int *) sp)[23];
  scePaf_1F166C10 (var215, 0x00000006, var216);
  var219 = ((int *) var1)[652];
  scePaf_1F166C10 (var219, 0x00000007, 0x00000000);
  var222 = ((int *) sp)[21];
  var223 = ((int *) sp)[22];
  if ((((0x00000000 < (var222 ^ 0x00000003))) & ((0x00000000 < (var222 ^ 0x00000006)))) != 0x00000000)
  {

  label191:
    var224 = ((int *) var1)[652];
    scePaf_1B0FDF28 (var224, 0x00000004);
  }
  else
  {
    if (!((((var223 + 0xFFFFFFFF) < 0x00000002)) != 0x00000000))
      goto label191;
  }
  __asm__ ("mtc1       $zr, $fpr12;");
  var227 = ((int *) var1)[652];
  var228 = 0x00000000;
  __asm__ ("mov.s      $fpr13, $fpr12;");
  scePaf_043C75D2 (var227);
  var231 = ((int *) var1)[652];
  while (1) {
    __asm__ ("mtc1       $zr, $fpr13;");
    var232 = ((int *) var231)[216];
    var233 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
             "mov.s      $fpr14, $fpr13;"
      : 
      : "=r"(0x3F800000));
    var234 = ((int *) (var232 + (var228 << 0x00000002)))[0];
    var228 = var228 + 0x00000001;
    scePaf_8906478F (var234);
    if (!(((var228 < 0x00000008)) != 0x00000000))
      break;
    var231 = ((int *) var1)[652];
    continue;
  }
  var237 = ((unsigned char *) var1)[3556];
  if (var237 == 0x00000000)
  {
    ((int *) var1)[890] = 0x00000000;
  }
  sub_21F04 (var1, 0x00000001);
  var242 = sub_21E8C (var1, 0x00000001);
  ra = ((int *) sp)[37];
  var243 = ((int *) sp)[36];
  var244 = ((int *) sp)[35];
  var245 = ((int *) sp)[34];
  var246 = ((int *) sp)[33];
  var247 = ((int *) sp)[32];
  var248 = ((int *) sp)[31];
  var249 = ((int *) sp)[30];
  var250 = ((int *) sp)[29];
  var251 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0001AF8C
 */
void sub_1AF8C (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[15] = s3;
  var1 = 0x00000000;
  ((int *) sp)[14] = s2;
  ((int *) sp)[19] = ra;
  ((int *) sp)[18] = s6;
  ((int *) sp)[17] = s5;
  ((int *) sp)[16] = s4;
  ((int *) sp)[13] = s1;
  ((int *) sp)[12] = s0;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[205];
  var4 = arg1;
  if (!(var3 <= 0))
  {
    var5 = "msgshare_settings";
    var6 = sp + 0x00000020;
    var7 = sp;
    while (1) {
      ((int *) sp)[0] = 0x00000000;
      var8 = var1 << 0x00000018;
      var9 = var8 | 0x00000027;
      ((int *) sp)[1] = 0x00000000;
      sub_33618 (var7, 0x00000000);
      var12 = ((int *) var4)[652];
      var13 = sp;
      var14 = ((int *) var12)[0];
      var15 = ((int *) var14)[45];
      var1 = var1 + 0x00000001;
      var18 var19 = (*var15) (var12, var13, var9);
      var20 = sp;
      sub_335E8 (var20);
      var23 = ((int *) var4)[893];
      var5 = var5 + 0x00000048;
      var26 = scePaf_970DC20D (var23, var5);
      var27 = sp;
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_33618 (var27, var26);
      var30 = ((int *) var4)[652];
      var31 = ((int *) var30)[0];
      var32 = ((int *) var31)[45];
      var33 = sp;
      var36 var37 = (*var32) (var30, var33, var9);
      var38 = sp;
      sub_335E8 (var38);
      var41 = ((int *) var4)[652];
      var42 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 32($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var43 = ((int *) var41)[0];
      __asm__ ("swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      var44 = ((int *) var43)[34];
      __asm__ ("swc1       $fpr00, 40($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      var47 var48 = (*var44) (var41, (var8 | 0x0000001A), 0x00000014, var6);
      var49 = ((int *) var4)[652];
      var50 = ((int *) var49)[205];
      var7 = sp;
      if (((var1 < var50)) != 0x00000000)
        continue;
      break;
    }
  }
  var51 = ((int *) var4)[652];
  scePaf_83BADBDF (var51, 0xFFFFFFFF);
  ra = ((int *) sp)[19];
  var54 = ((int *) sp)[18];
  var55 = ((int *) sp)[17];
  var56 = ((int *) sp)[16];
  var57 = ((int *) sp)[15];
  var58 = ((int *) sp)[14];
  var59 = ((int *) sp)[13];
  var60 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0001B0DC
 */
int sub_1B0DC (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = s4;
  ((int *) sp)[13] = s1;
  var1 = arg1;
  ((int *) sp)[17] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  ((int *) sp)[12] = s0;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var3 << 0x00000001;
  var5 = var1 + ((var4 + var3) << 0x00000002);
  var6 = ((int *) var5)[895];
  var7 = 0x00000000;
  if (!(var6 == 0x00000000))
  {
    var8 = ((int *) var5)[894];
    var9 = 0x00000000;
    while (1) {
      var10 = ((int *) var8)[1];
      ((int *) sp)[0] = var10;
      var11 = ((int *) var5)[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var13 = ((int *) var1)[652];
      var16 = scePaf_BE7032D1 (var13, 0xFFFFFFFF);
      var9 = var9 + 0x00000001;
      if (((var9 < var16)) == 0x00000000)
        break;
      var8 = ((int *) sp)[0];
      ((int *) sp)[8] = var8;
      continue;
    }
    var17 = ((int *) (var1 + ((var4 + var3) << 0x00000002)))[894];
    var18 = ((int *) sp)[0];
    var7 = 0x00000000;
    ((int *) sp)[8] = var17;
    if (!(var18 == var17))
    {
      var19 = ((int *) var18)[2];
      var20 = ((int *) var19)[4];
      var7 = (0x00000000 < var20);
    }
  }
  ra = ((int *) sp)[17];
  var21 = ((int *) sp)[16];
  var22 = ((int *) sp)[15];
  var23 = ((int *) sp)[14];
  var24 = ((int *) sp)[13];
  var25 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var7;
}

/**
 * Subroutine at address 0x0001B1B8
 */
int sub_1B1B8 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = s4;
  ((int *) sp)[13] = s1;
  var1 = arg1;
  ((int *) sp)[17] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  ((int *) sp)[12] = s0;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var3 << 0x00000001;
  var5 = var1 + ((var4 + var3) << 0x00000002);
  var6 = ((int *) var5)[895];
  var7 = 0x00000000;
  if (!(var6 == 0x00000000))
  {
    var8 = ((int *) var5)[894];
    var9 = 0x00000000;
    while (1) {
      var10 = ((int *) var8)[1];
      ((int *) sp)[0] = var10;
      var11 = ((int *) var5)[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var13 = ((int *) var1)[652];
      var16 = scePaf_BE7032D1 (var13, 0xFFFFFFFF);
      var9 = var9 + 0x00000001;
      if (((var9 < var16)) == 0x00000000)
        break;
      var8 = ((int *) sp)[0];
      ((int *) sp)[8] = var8;
      continue;
    }
    var17 = ((int *) (var1 + ((var4 + var3) << 0x00000002)))[894];
    var18 = ((int *) sp)[0];
    var7 = 0x00000000;
    ((int *) sp)[8] = var17;
    if (!(var18 == var17))
    {
      var19 = ((int *) var18)[2];
      var7 = ((unsigned char *) var19)[30];
    }
  }
  ra = ((int *) sp)[17];
  var20 = ((int *) sp)[16];
  var21 = ((int *) sp)[15];
  var22 = ((int *) sp)[14];
  var23 = ((int *) sp)[13];
  var24 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var7;
}

/**
 * Subroutine at address 0x0001B290
 */
int sub_1B290 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xFFFFFC0E;
  if (((arg2 < 0x00000008)) == 0x00000000)
  {

  label26:
    var17 = var1;
  }
  else
  {
    if (arg3 == 0x00000002)
    {
      var19 = ((unsigned char *) arg1)[3673];
      if (var19 != 0x00000000)
      {

      label9:
        if (arg3 == 0x00000003)
        {
          var18 = ((unsigned char *) arg1)[3674];
          if (var18 != 0x00000000)
          {

          label13:
            var2 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
            var3 = ((int *) var2)[894];
            var4 = 0xFFFFFC0E;
            var5 = ((int *) var3)[1];
            var6 = 0x00000000;
            while (1) {
              ((int *) sp)[0] = var5;
              var7 = 0xFFFFFFFF;
              var8 = ((int *) var2)[894];
              var9 = ((int *) sp)[0];
              ((int *) sp)[4] = var8;
              if (var9 == var8)
              {

              label25:
                var1 = var4;
              }
              else
              {
                var10 = ((int *) arg1)[652];
                if (arg2 < 0)
                {

                label19:
                  var14 = (var6 < var7);
                }
                else
                {
                  var11 = ((int *) var10)[205];
                  if (((arg2 < var11)) == 0x00000000)
                  {
                    var14 = (var6 < 0xFFFFFFFF);
                  }
                  else
                  {
                    var12 = ((int *) var10)[216];
                    var13 = ((int *) (var12 + (arg2 << 0x00000002)))[0];
                    var7 = ((int *) var13)[204];
                    goto label19;
                  }
                }
                var1 = 0xFFFFFC0E;
                if (var14 == 0x00000000)
                  break;
                var15 = ((int *) var9)[2];
                var16 = ((unsigned char *) var15)[4];
                if (((arg3 < var16)) != 0x00000000)
                {
                  var1 = 0xFFFFFC0E;
                }
                else
                {
                  if (var16 == arg3)
                  {
                    var4 = var6;
                    goto label25;
                  }
                  else
                  {
                    ((int *) sp)[8] = var9;
                    var6 = var6 + 0x00000001;
                    var5 = ((int *) var9)[1];
                    continue;
                  }
                }
              }
            }
            goto label26;
          }
          else
          {
            var17 = 0xFFFFFC0E;
          }
        }
        else
        goto label13;
      }
      else
      {
        var17 = 0xFFFFFC0E;
      }
    }
    else
    {
      goto label9;
    }
  }
  sp = sp + 0x00000030;
  return var17;
}

/**
 * Subroutine at address 0x0001B388
 */
int sub_1B388 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[0];
  var2 = arg1;
  sp = sp + 0xFFFFFFD0;
  var3 = (var1 >> 16) & 0x000000FF;
  var4 = 0x00000000;
  if (!(((var3 < 0x00000008)) == 0x00000000))
  {
    var5 = var2 + (((var3 << 0x00000001) + var3) << 0x00000002);
    var6 = ((int *) var5)[894];
    var7 = var3;
    var8 = ((int *) var6)[1];
    var9 = 0x00000000;
    ((int *) sp)[0] = var8;
    while (1) {
      var10 = ((int *) var5)[894];
      var11 = ((int *) sp)[0];
      var12 = 0xFFFFFFFF;
      ((int *) sp)[4] = var10;
      if (var11 == var10)
      {

      label11:
        var4 = (var9) ? (var9 + 0xFFFFFFFF) : 0x00000000;
      }
      else
      {
        var13 = ((int *) var2)[652];
        if (var7 < 0)
        {

        label9:
          var17 = (var9 < var12);
        }
        else
        {
          var14 = ((int *) var13)[205];
          if (((var7 < var14)) == 0x00000000)
          {
            var17 = (var9 < 0xFFFFFFFF);
          }
          else
          {
            var15 = ((int *) var13)[216];
            var16 = ((int *) (var15 + (var7 << 0x00000002)))[0];
            var12 = ((int *) var16)[204];
            goto label9;
          }
        }
        var4 = var9;
        if (var17 == 0x00000000)
          goto label11;
        var18 = ((int *) var11)[2];
        var19 = ((unsigned char *) var18)[4];
        var9 = var9 + 0x00000001;
        if ((((var1 & 0x000000FF) < var19)) != 0x00000000)
          break;
        ((int *) sp)[8] = var11;
        var20 = ((int *) var11)[1];
        ((int *) sp)[0] = var20;
        continue;
      }
    }
  }
  sp = sp + 0x00000030;
  return var4;
}

/**
 * Subroutine at address 0x0001B45C
 */
int sub_1B45C (int arg1, int arg2, int arg3)
{
  var1 = ((int *) arg2)[0];
  var2 = arg1;
  sp = sp + 0xFFFFFFD0;
  var3 = (var1 >> 16) & 0x000000FF;
  var4 = 0xFFFFFC0E;
  var5 = 0xFFFFFC0E;
  if (!(((var3 < 0x00000008)) == 0x00000000))
  {
    var6 = var2 + (((var3 << 0x00000001) + var3) << 0x00000002);
    var7 = ((int *) var6)[894];
    var8 = var3;
    var9 = ((int *) var7)[1];
    var10 = 0x00000000;
    ((int *) sp)[0] = var9;
    while (1) {
      var11 = ((int *) var6)[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var13 = ((int *) var2)[652];
      if (var8 < 0)
      {
        var17 = 0xFFFFFFFF;
      }
      else
      {
        var14 = ((int *) var13)[205];
        if (((var8 < var14)) == 0x00000000)
        {
          var17 = 0xFFFFFFFF;
        }
        else
        {
          var15 = ((int *) var13)[216];
          var16 = ((int *) (var15 + (var8 << 0x00000002)))[0];
          var17 = ((int *) var16)[204];
        }
      }
      var5 = 0xFFFFFC0E;
      if (!(((var10 < var17)) == 0x00000000))
      {
        if ((arg3 & 0x00000001) == 0x00000000)
        {

        label13:
          if ((arg3 & 0x00000002) == 0x00000000)
          {

          label16:
            if ((arg3 & 0x00000004) == 0x00000000)
            {
              var4 = var10;
              goto label21;
            }
            else
            {
              var23 = ((int *) var12)[2];
              var24 = ((unsigned char *) var23)[4];
              if (var24 != (var1 & 0x000000FF))
              {
                ((int *) sp)[8] = var12;

              label25:
                var10 = var10 + 0x00000001;
                var20 = ((int *) var12)[1];
                ((int *) sp)[0] = var20;
                continue;
              }
              else
              {
                var4 = var10;
                goto label21;
              }
            }
          }
          else
          {
            var21 = ((int *) var12)[2];
            var22 = ((unsigned char *) var21)[5];
            if (!(var22 != ((var1 >> 8) & 0x000000FF)))
              goto label16;
            ((int *) sp)[8] = var12;
            goto label25;
          }
        }
        else
        {
          var18 = ((int *) var12)[2];
          var19 = ((int *) var18)[1];
          if (((var19 & 0x00FF0000) >> 0x00000010) == var8)
            goto label13;
          ((int *) sp)[8] = var12;
          goto label25;
        }
      }
      goto label22;
    }

  label21:
    var5 = var4;
  }

label22:
  sp = sp + 0x00000030;
  return var5;
}

/**
 * Subroutine at address 0x0001B584
 */
int sub_1B584 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xFFFFFC0E;
  if (arg3 < 0)
  {
    arg3 = 0x00000000;

  label5:
    var3 = arg1 + (((arg3 << 0x00000001) + arg3) << 0x00000002);
    var4 = ((int *) var3)[894];
    var5 = 0x00000000;
    var6 = ((int *) var4)[1];
    while (1) {
      ((int *) sp)[0] = var6;
      var7 = 0xFFFFFFFF;
      var8 = ((int *) var3)[894];
      var9 = ((int *) sp)[0];
      ((int *) sp)[4] = var8;
      if (var9 == var8)
      {

      label15:
        var2 = var1;
      }
      else
      {
        var10 = ((int *) arg1)[652];
        if (arg3 < 0)
        {

        label11:
          var14 = (var5 < var7);
        }
        else
        {
          var11 = ((int *) var10)[205];
          if (((arg3 < var11)) == 0x00000000)
          {
            var14 = (var5 < 0xFFFFFFFF);
          }
          else
          {
            var12 = ((int *) var10)[216];
            var13 = ((int *) (var12 + (arg3 << 0x00000002)))[0];
            var7 = ((int *) var13)[204];
            goto label11;
          }
        }
        var2 = 0xFFFFFC0E;
        if (var14 == 0x00000000)
          break;
        var15 = ((int *) var9)[2];
        var16 = ((int *) var15)[0];
        if (var16 == arg2)
        {
          var1 = var5;
          goto label15;
        }
        else
        {
          ((int *) sp)[8] = var9;
          var5 = var5 + 0x00000001;
          var6 = ((int *) var9)[1];
          continue;
        }
      }
    }
  }
  else
  {
    var2 = 0xFFFFFC0E;
    if (!(((arg3 < 0x00000008)) == 0x00000000))
      goto label5;
  }
  sp = sp + 0x00000030;
  return var2;
}

/**
 * Subroutine at address 0x0001B644
 */
int sub_1B644 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg1)[652];
  var2 = ((int *) var1)[206];
  var5 = scePaf_BE7032D1 (var1, 0xFFFFFFFF);
  var8 = sub_1B68C (arg1, var2, var5);
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var8;
}

/**
 * Subroutine at address 0x0001B68C
 */
int sub_1B68C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  if (arg2 < 0)
  {

  label15:
    var5 = 0x00000000;
  }
  else
  {
    var1 = ((int *) arg1)[652];
    var2 = ((int *) var1)[205];
    if ((((var2 + 0xFFFFFFFF) < arg2)) != 0x00000000)
    {
      var5 = 0x00000000;
    }
    else
    {
      var3 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
      var4 = ((int *) var3)[895];
      if (var4 == 0x00000000)
      {
        goto label15;
      }
      else
      {
        if (!((((var4 + 0xFFFFFFFF) < arg3)) == 0x00000000))
          goto label15;
        var6 = ((int *) var3)[894];
        var7 = 0x00000000;
        while (1) {
          var8 = ((int *) var6)[1];
          var7 = var7 + 0x00000001;
          ((int *) sp)[0] = var8;
          var9 = ((int *) var3)[894];
          var6 = ((int *) sp)[0];
          ((int *) sp)[4] = var9;
          if (var6 == var9)
            break;
          if (((var7 < arg3)) == 0x00000000)
          {
            var5 = ((int *) var6)[2];
          }
          else
          {
            ((int *) sp)[8] = var6;
            continue;
          }
          goto label16;
        }
        var5 = ((int *) var6)[2];
      }
    }
  }

label16:
  sp = sp + 0x00000030;
  return var5;
}

/**
 * Subroutine at address 0x0001B71C
 */
int sub_1B71C (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[895];
  var6 = 0xFFFFFFFF;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[894];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_BE7032D1 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[652];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[2];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0001B7D4
 */
int sub_1B7D4 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[895];
  var6 = 0xFFFFFFFF;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[894];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_BE7032D1 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[652];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[6];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0001B88C
 */
int sub_1B88C (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[895];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[894];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_BE7032D1 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[652];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var18 = ((int *) var17)[4];
    var6 = 0x00000000;
    if (!(var18 == 0x00000000))
    {
      var19 = ((char *) var18)[0];
      var20 = 0x00000000;
      if (!(var19 == 0x00000000))
      {
        while (1) {
          var18 = var18 + 0x0000003C;
          var21 = ((char *) var18)[0];
          var20 = var20 + 0x00000001;
          if (var21 != 0x00000000)
            continue;
          break;
        }
      }
      var6 = var20;
    }
  }
  ra = ((int *) sp)[14];
  var22 = ((int *) sp)[13];
  var23 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0001B96C
 */
int sub_1B96C (int arg1, int arg2, int arg3)
{
  var1 = ((int *) arg2)[4];
  var2 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    var3 = 0x00000000;
    if (arg3 < 0)
    {

    label8:
      var2 = var1 + (((arg3 << 0x00000004) - arg3) << 0x00000002);
    }
    else
    {
      var4 = var1 + 0x00000038;
      var5 = ((int *) var4)[0];
      while (1) {
        var3 = var3 + 0x00000001;
        var4 = var4 + 0x0000003C;
        var2 = 0x00000000;
        if (var5 == 0xFFFFFFFF)
          break;
        if (!(((arg3 < var3)) == 0x00000000))
          goto label8;
        var5 = ((int *) var4)[0];
        continue;
      }
    }
  }
  return var2;
}

/**
 * Subroutine at address 0x0001B9C0
 */
int sub_1B9C0 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[895];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[894];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_BE7032D1 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[652];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var18 = ((int *) var17)[5];
    var6 = 0x00000000;
    if (!(var18 == 0x00000000))
    {
      var19 = ((char *) var18)[0];
      var20 = 0x00000000;
      if (!(var19 == 0x00000000))
      {
        while (1) {
          var18 = var18 + 0x00000018;
          var21 = ((char *) var18)[0];
          var20 = var20 + 0x00000001;
          if (var21 != 0x00000000)
            continue;
          break;
        }
      }
      var6 = var20;
    }
  }
  ra = ((int *) sp)[14];
  var22 = ((int *) sp)[13];
  var23 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0001BAA0
 */
int sub_1BAA0 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[895];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[894];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_BE7032D1 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[652];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[4];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0001BB58
 */
int sub_1BB58 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[652];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[895];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[894];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[894];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_BE7032D1 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[652];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[5];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0001BC10
 */
void sub_1BC10 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) var1)[1] = 0x00000000;
  ((int *) sp)[5] = ra;
  var4 = sub_1B644 (arg2);
  if (var4 == 0x00000000)
  {

  label15:
    var6 = 0x000394B0;
  }
  else
  {
    var5 = ((int *) var4)[0];
    if (var5 == 0x00000010)
    {

    label13:
      var6 = "disc0:/UMD_AUDIO/";
    }
    else
    {
      if (((var5 < 0x00000011)) == 0x00000000)
      {
        var6 = "disc0:/UMD_VIDEO/";
        if (!(var5 == 0x00000011))
        {
          var6 = "disc0:/PSP_GAME/";
          if (var5 != 0x00000015)
          {

          label14:
            goto label15;
          }
          else
          {
          }
        }
      }
      else
      {
        if (var5 == 0x0000000E)
          goto label13;
        goto label14;
      }
    }
  }
  sub_318F0 (var1, var6);
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001BCB8
 */
void sub_1BCB8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[35] = s7;
  var1 = arg1;
  ((int *) sp)[36] = ra;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  if (arg4 == 0xFFFFFFFF)
  {
    ((char *) sp)[0] = 0x00000000;
  }
  else
  {
    ((char *) sp)[0] = 0x0000005F;
    var2 = ((hi (arg4 * 0x66666667)) >> 0x00000002) - (arg4 >> 0x0000001F);
    var3 = sp + 0x00000001;
    if (!(var2 == 0x00000000))
    {
      ((char *) sp)[1] = (var2 + 0x00000030);
      var3 = sp + 0x00000002;
    }
    ((char *) var3)[0] = ((arg4 - (((var2 << 0x00000002) + var2) << 0x00000001)) + 0x00000030);
    ((char *) var3)[1] = 0x00000000;
  }
  ((int *) var1)[0] = 0x00000000;
  ((int *) var1)[1] = 0x00000000;
  if (((arg3 < 0x00000006)) == 0x00000000)
  {
  case 3:

  label35:
    sub_318F0 (var1, 0x000394B0);
  }
  else
  {
    var4 = ((int *) ((arg3 << 0x00000002) + 0x00043088))[0];
    switch () {
    case 0:
      var5 = sp + 0x00000050;
      var6 = sp + 0x00000060;
      sub_1BC10 (var5, arg2);
      ((int *) sp)[24] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000030;
      ((int *) sp)[25] = 0x00000000;
      sub_31940 (var6, var5);
      var15 = scePaf_967A56EF (0x000394F0);
      var18 = sub_33528 (var6, 0x000394F0, var15);
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[17] = 0x00000000;
      sub_31940 (var9, var18);
      sub_317D8 (var6);
      ((int *) sp)[24] = 0x00000000;
      var23 = sp + 0x00000020;
      ((int *) sp)[25] = 0x00000000;
      sub_31940 (var6, var9);
      var26 = sp;
      var29 = scePaf_967A56EF (var26);
      var30 = sp;
      var33 = sub_33528 (var6, var30, var29);
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      sub_31940 (var10, var33);
      sub_317D8 (var6);
      ((int *) sp)[24] = 0x00000000;
      ((int *) sp)[25] = 0x00000000;
      sub_31940 (var6, var10);
      var42 = scePaf_967A56EF (0x000394F8);
      var45 = sub_33528 (var6, 0x000394F8, var42);
      var46 = var45;
      var47 = var23;
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[9] = 0x00000000;

    label101:
      sub_31940 (var47, var46);
      sub_317D8 (var6);
      sub_31940 (var1, var23);
      sub_317D8 (var23);
      sub_317D8 (var10);
      sub_317D8 (var9);
      sub_317D8 (var5);
      goto label116;
    case 1:
      var5 = sp + 0x00000030;
      sub_1BC10 (var5, arg2);
      var6 = sp + 0x00000020;
      var72 = "PIC0";

    label44:
      ((int *) sp)[8] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000050;
      ((int *) sp)[9] = 0x00000000;
      sub_31940 (var6, var5);
      var77 = scePaf_967A56EF (var72);
      var80 = sub_33528 (var6, var72, var77);
      ((int *) sp)[16] = 0x00000000;
      var23 = sp + 0x00000060;
      ((int *) sp)[17] = 0x00000000;
      sub_31940 (var9, var80);
      sub_317D8 (var6);
      var85 = var9;
      var86 = var6;
      ((int *) sp)[8] = 0x00000000;
      var87 = ".PNG";

    label55:
      ((int *) sp)[9] = 0x00000000;
      sub_31940 (var86, var85);
      var90 = sp;
      var93 = scePaf_967A56EF (var90);
      var94 = sp;
      var97 = sub_33528 (var6, var94, var93);
      ((int *) sp)[20] = 0x00000000;
      ((int *) sp)[21] = 0x00000000;
      sub_31940 (var10, var97);
      sub_317D8 (var6);
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[9] = 0x00000000;
      sub_31940 (var6, var10);
      var106 = scePaf_967A56EF (var87);
      var109 = sub_33528 (var6, var87, var106);
      ((int *) sp)[24] = 0x00000000;
      var46 = var109;
      var47 = var23;
      ((int *) sp)[25] = 0x00000000;
      goto label101;
    case 2:
      var5 = sp + 0x00000030;
      sub_1BC10 (var5, arg2);
      var6 = sp + 0x00000020;
      var72 = "ICON0";
      goto label44;
    goto label35;
    case 4:
      var5 = sp + 0x00000030;
      var6 = sp + 0x00000020;
      sub_1BC10 (var5, arg2);
      ((int *) sp)[8] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000050;
      ((int *) sp)[9] = 0x00000000;
      sub_31940 (var6, var5);
      var120 = scePaf_967A56EF (0x00039510);
      var123 = sub_33528 (var6, 0x00039510, var120);
      ((int *) sp)[16] = 0x00000000;
      var23 = sp + 0x00000060;
      ((int *) sp)[17] = 0x00000000;
      sub_31940 (var9, var123);
      sub_317D8 (var6);
      var85 = var9;
      var86 = var6;
      ((int *) sp)[8] = 0x00000000;
      var87 = ".PMF";
      goto label55;
    case 5:
      var5 = sp + 0x00000030;
      var6 = sp + 0x00000020;
      sub_1BC10 (var5, arg2);
      ((int *) sp)[8] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000050;
      ((int *) sp)[9] = 0x00000000;
      sub_31940 (var6, var5);
      var134 = scePaf_967A56EF (0x00039520);
      var137 = sub_33528 (var6, 0x00039520, var134);
      ((int *) sp)[16] = 0x00000000;
      var23 = sp + 0x00000060;
      ((int *) sp)[17] = 0x00000000;
      sub_31940 (var9, var137);
      sub_317D8 (var6);
      var85 = var9;
      var86 = var6;
      ((int *) sp)[8] = 0x00000000;
      var87 = ".AT3";
      goto label55;
    }
  }

label116:
  ra = ((int *) sp)[36];
  var62 = ((int *) sp)[35];
  var63 = ((int *) sp)[34];
  var64 = ((int *) sp)[33];
  var65 = ((int *) sp)[32];
  var66 = ((int *) sp)[31];
  var67 = ((int *) sp)[30];
  var68 = ((int *) sp)[29];
  var69 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0001C12C
 */
void sub_1C12C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = 0xFFFFFFFF;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var3 = ((int *) arg1)[663];
  var4 = 0xFFFFFFFF;
  if ((var3 & 0x00000100) != 0x00000000)
  {

  label10:
    var35 = sub_1B290 (arg1, 0x00000005, 0x00000002);
    var1 = var35;
    var4 = 0x00000005;

  label20:
    var9 = !(var1 | var4);
  }
  else
  {
    if ((var3 & 0x00000400) == 0x00000000)
    {
      if ((var3 & 0x00000200) != 0x00000000)
      {

      label14:
        var32 = sub_1B290 (arg1, 0x00000002, 0x00000002);
        var1 = var32;
        var4 = 0x00000002;
        goto label20;
      }
      else
      {
        if (var3 != 0x00000080)
        {
          var9 = !(0xFFFFFFFF | 0xFFFFFFFF);
        }
        else
        {
          goto label10;
        }
      }
    }
    else
    {
      var5 = ((int *) arg1)[780];
      if (var5 == 0x00000008)
        goto label14;
      var8 = sub_1B290 (arg1, 0x00000003, 0x00000002);
      var1 = var8;
      var4 = 0x00000003;
      goto label20;
    }
  }
  if (var9 < 0)
  {
    var15 = sub_208C4 (var2);
    if (var15 != 0x00000000)
    {
      sub_1C32C (var2, var4, var1);
    }
    else
    {
      var16 = ((unsigned char *) var2)[272];
      if (var16 == 0x00000000)
      {
      }
      else
      {
        var19 = sub_1B1B8 (var2);
        if (var19 == 0x00000000)
        {
        }
        else
        {
          var20 = ((int *) var2)[652];
          var23 = scePaf_B18293CA (var20, 0x0000006F);
          if ((var23 & 0x000000FF) != 0x00000000)
          {
          }
          else
          {
            var24 = ((int *) var2)[652];
            var25 = 0x447A0000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x447A0000));
            scePaf_DE0E0F8B (var24, 0x0000006F, 0x00016788, 0x00000000);
          }
        }
      }
    }
  }
  else
  {
  }
  ((char *) var2)[284] = 0x00000001;
  ra = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C26C
 */
void sub_1C26C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg4;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[206];
  var3 = ((short *) arg4)[101];
  if (var2 == var3)
  {
    var12 = scePaf_ED055C3C (arg1, 0x00000070);
    var15 = sub_1B1B8 (var1);
    if (var15 != 0x00000000)
    {
      var19 = ((int *) var1)[652];
      var22 = scePaf_B18293CA (var19, 0x0000006F);
      var23 = 0x447A0000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x447A0000));
      if ((var22 & 0x000000FF) != 0x00000000)
      {

      label14:
      }
      else
      {
        var24 = ((int *) var1)[652];
        scePaf_DE0E0F8B (var24, 0x0000006F, 0x00016788, 0x00000000);
      }
    }
    else
    goto label14;
    var18 = sub_21E8C (var1, 0x00000000);
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (((var2 < var3)) == 0x00000000)
    {
      scePaf_EF154C08 (arg1, 0x00000000);
      ra = ((int *) sp)[1];
    }
    else
    {
      scePaf_AD91D955 (arg1, 0x00000000);
      ra = ((int *) sp)[1];
    }
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C32C
 */
void sub_1C32C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if ((arg3 | arg2) >= 0)
  {
    ((int *) arg1)[50] = ((arg2 << 0x00000010) | arg3);
    var5 = sub_21E8C (arg1, 0x00000001);
    var6 = ((int *) var1)[652];
    var9 = scePaf_ED055C3C (var6, 0x00000070);
    if ((var9 & 0x000000FF) != 0x00000000)
    {
      var16 = sub_21E8C (var1, 0x00000000);
      var17 = ((int *) var1)[652];
    }
    else
    {
      var10 = ((int *) var1)[652];
    }
    var11 = 0x42840000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42840000));
    scePaf_485890F9 (var10, 0x00000070, 0x0001C26C, var1);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C3C0
 */
int sub_1C3C0 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[1];
  var2 = 0x00000000;
  if (!(var1 == 0x00000001))
  {
    var3 = ((int *) arg2)[0];
    var4 = var3 + 0xFFFFFFF3;
    if (((var4 < 0x0000000B)) == 0x00000000)
    {
    }
    else
    {
      var5 = ((int *) ((var4 << 0x00000002) + 0x000430A0))[0];
      switch () {
      case 0:
        var6 = 0x00000000;

      label16:
        var2 = (var6 * 0x0000008C) + 0x00047B2C;
        goto label17;
      case 1:
        var6 = 0x00000004;
        goto label16;
      case 2:
        var6 = 0x00000001;
        goto label16;
      case 3:
        var6 = 0x00000005;
        goto label16;
      case 4:
        var6 = 0x00000006;
        goto label16;
      case 5:
        var6 = 0x00000002;
        goto label16;
      case 6:
      case 7:
        var2 = 0x00000000;
        goto label17;
      case 8:
        var6 = 0x00000007;
        goto label16;
      case 9:
        var6 = 0x00000003;
        goto label16;
      case 10:
        var6 = 0x00000008;
        goto label16;
      }
    }
  }

label17:
  return var2;
}

/**
 * Subroutine at address 0x0001C468
 */
int sub_1C468 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[15] = s3;
  var1 = arg1;
  ((int *) sp)[14] = s2;
  var2 = arg3;
  var3 = arg2;
  ((int *) sp)[13] = s1;
  var4 = arg3;
  ((int *) sp)[16] = ra;
  ((int *) sp)[12] = s0;
  var5 = ((unsigned char *) arg3)[4];
  ((int *) arg3)[1] = var5;
  if (var5 == 0x00000001)
  {

  label9:
    var19 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
    var20 = ((int *) var19)[894];
    var21 = ((int *) var2)[1];
    var22 = ((int *) var20)[1];
    var23 = 0x00000000;
    var24 = 0x00000000;
    var25 = var21 & 0x000000FF;
    ((int *) sp)[0] = var22;
    while (1) {
      var26 = ((int *) var19)[894];
      var27 = ((int *) sp)[0];
      ((int *) sp)[4] = var26;
      if (var27 == var26)
        break;
      var28 = ((int *) var27)[2];
      var29 = ((unsigned char *) var28)[4];
      if (((var25 < var29)) != 0x00000000)
        break;
      ((int *) sp)[8] = var27;
      var24 = var24 + (((var29 ^ var25) < 0x00000001));
      var23 = var23 + 0x00000001;
      var30 = ((int *) var27)[1];
      ((int *) sp)[0] = var30;
      continue;
    }
    ((int *) var2)[1] = ((var21 | ((var3 & 0x000000FF) << 0x00000010)) | ((var24 & 0x000000FF) << 0x00000008));
    sub_1C72C (var1, var3, var23, var2);
    var33 = ((int *) var1)[892];
    sub_250B0 (var33, var3, (var4 + 0x0000001F));
    var9 = var23;
  }
  else
  {
    var8 = sub_1C3C0 (arg2, arg3);
    var2 = var8;
    var9 = 0xFFFFFFFF;
    if (!(var2 == 0x00000000))
    {
      var10 = var2;
      var11 = var4;
      while (1) {
        var12 = ((int *) var11)[0];
        var13 = ((int *) var11)[1];
        var14 = ((int *) var11)[2];
        var15 = ((int *) var11)[3];
        ((int *) var10)[0] = var12;
        var11 = var11 + 0x00000010;
        var10 = var10 + 0x00000010;
        ((int *) var10)[1073741821] = var13;
        ((int *) var10)[1073741822] = var14;
        ((int *) var10)[1073741823] = var15;
        if (var11 != (var4 + 0x00000080))
          continue;
        break;
      }
      var16 = ((int *) var11)[0];
      var17 = ((int *) var11)[1];
      var18 = ((int *) var11)[2];
      ((int *) var10)[0] = var16;
      ((int *) var10)[1] = var17;
      ((int *) var10)[2] = var18;
      goto label9;
    }
  }
  ra = ((int *) sp)[16];
  var36 = ((int *) sp)[15];
  var37 = ((int *) sp)[14];
  var38 = ((int *) sp)[13];
  var39 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var9;
}

/**
 * Subroutine at address 0x0001C5D4
 */
void sub_1C5D4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[21] = s5;
  var1 = arg1;
  ((int *) sp)[20] = s4;
  var2 = arg4;
  ((int *) sp)[19] = s3;
  var3 = arg2;
  ((int *) sp)[22] = ra;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  var4 = ((unsigned char *) arg4)[4];
  var5 = 0xFFFFFFFF;
  ((int *) var2)[1] = var4;
  if (!(var4 != 0x00000001))
  {
    var6 = arg2 << 0x00000001;
    var7 = arg1 + ((var6 + arg2) << 0x00000002);
    var8 = ((int *) var7)[894];
    var9 = 0x00000000;
    var10 = ((int *) var8)[1];
    ((int *) sp)[0] = var10;
    var11 = ((int *) var7)[894];
    ((int *) sp)[4] = var11;
    if (!(var10 == var11))
    {
      while (1) {
        var12 = ((int *) sp)[0];
        var13 = ((int *) var12)[2];
        var14 = ((int *) var13)[0];
        if (var14 == arg3)
          break;
        ((int *) sp)[12] = var12;
        var9 = var9 + 0x00000001;
        var15 = ((int *) var12)[1];
        ((int *) sp)[0] = var15;
        var16 = ((int *) var7)[894];
        ((int *) sp)[4] = var16;
        if (var15 != var16)
          continue;
        var5 = 0xFFFFFFFF;
        goto label19;
      }
      var23 = ((int *) var1)[652];
      var26 = scePaf_BE7032D1 (var23, var3);
      var27 = ((int *) sp)[0];
      var28 = ((int *) var27)[2];
      var29 = var1 + ((var6 + var3) << 0x00000002);
      var30 = ((int *) var28)[1];
      var31 = sp + 0x00000020;
      var32 = sp + 0x00000030;
      ((int *) var2)[1] = var30;
      ((int *) sp)[12] = var27;
      sub_33884 (var31, (var29 + 0x00000DF8), var32);
      __asm__ ("mtc1       $zr, $fpr12;");
      var35 = ((int *) var29)[894];
      var36 = ((int *) var1)[652];
      var37 = ((int *) var35)[1];
      ((int *) sp)[0] = var37;
      ((int *) sp)[12] = var37;
      scePaf_08CA8950 (var36, var3, var9);
      sub_1C72C (var1, var3, var9, var2);
      var42 = ((int *) var1)[652];
      scePaf_1F166C10 (var42, var3, var26);
      var5 = var9;
    }
  }

label19:
  ra = ((int *) sp)[22];
  var17 = ((int *) sp)[21];
  var18 = ((int *) sp)[20];
  var19 = ((int *) sp)[19];
  var20 = ((int *) sp)[18];
  var21 = ((int *) sp)[17];
  var22 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0001C72C
 */
void sub_1C72C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s2;
  var1 = arg1;
  ((int *) sp)[20] = s0;
  var2 = arg2;
  ((int *) sp)[23] = ra;
  ((int *) sp)[21] = s1;
  var3 = ((int *) arg1)[652];
  ((int *) sp)[16] = arg4;
  if (var3 == 0x00000000)
  {

  label20:
    ra = ((int *) sp)[23];
  }
  else
  {
    var4 = ((int *) var3)[205];
    if (((var4 < arg2)) != 0x00000000)
    {
      ra = ((int *) sp)[23];
    }
    else
    {
      var5 = 0xFFFFFFFF;
      if (!(arg2 < 0))
      {
        if (((arg2 < var4)) == 0x00000000)
        {
          var5 = 0xFFFFFFFF;
        }
        else
        {
          var6 = ((int *) var3)[216];
          var7 = ((int *) (var6 + (arg2 << 0x00000002)))[0];
          var5 = ((int *) var7)[204];
        }
      }
      ra = ((int *) sp)[23];
      if (!(((var5 < arg3)) != 0x00000000))
      {
        var8 = var2 << 0x00000001;
        if (!(arg3 < 0))
        {
          var9 = var1 + ((var8 + var2) << 0x00000002);
          var10 = ((int *) var9)[894];
          var11 = 0x00000000;
          var12 = ((int *) var10)[1];
          while (1) {
            ((int *) sp)[0] = var12;
            var13 = ((int *) var9)[894];
            var14 = ((int *) sp)[0];
            ((int *) sp)[4] = var13;
            if (var14 == var13)
              break;
            if (((var11 < arg3)) == 0x00000000)
            {
              var15 = var8 + var2;
            }
            else
            {
              ((int *) sp)[8] = var14;
              var11 = var11 + 0x00000001;
              var12 = ((int *) var14)[1];
              continue;
            }
            goto label16;
          }
          var15 = var8 + var2;

        label16:
          var16 = sp + 0x00000020;
          var17 = sp + 0x00000030;
          var18 = sp + 0x00000040;
          ((int *) sp)[12] = var14;
          sub_338EC (var16, ((var1 + (var15 << 0x00000002)) + 0x00000DF8), var17, var18);
          var21 = ((int *) var1)[652];
          scePaf_52072B01 (var21, var2, var11);
          goto label20;
        }
      }
    }
  }
  var24 = ((int *) sp)[22];
  var25 = ((int *) sp)[21];
  var26 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0001C838
 */
int sub_1C838 (int arg1, int arg2)
{
  var1 = ((int *) arg1)[652];
  var2 = ((int *) var1)[206];
  var3 = arg1;
  if (arg2 == var2)
  {
    var8 = ((unsigned char *) arg1)[272];
    var6 = 0x00000000;
    if (!(var8 == 0x00000000))
    {
      var9 = ((int *) arg1)[48];
      if (!((var9 & 0x00000200) != 0x00000000))
      {
        var10 = ((unsigned char *) arg1)[275];
        if (var10 == 0x00000000)
        {
          var4 = arg2 << 0x00000002;

        label9:
          var5 = ((int *) (var4 + var3))[80];
          var6 = 0x00000001;
          if (!(var5 == 0x00000001))
          {
            var7 = ((unsigned char *) var3)[284];
            var6 = 0x00000000;
            if (!(var7 == 0x00000000))
            {
              var6 = 0x00000001;
            }
          }
        }
        else
        {
        }
      }
    }
  }
  else
  {
    var4 = arg2 << 0x00000002;
    goto label9;
  }
  return var6;
}

/**
 * Subroutine at address 0x0001C8A8
 */
int sub_1C8A8 (int arg1, int arg2)
{
  var1 = arg1;
  var2 = ((int *) ((arg2 << 0x00000002) + arg1))[80];
  if (var2 == 0x00000002)
  {
    var4 = ((unsigned char *) var1)[285];
    var3 = 0x00000001;
    if (var4 == 0x00000000)
    {

    label12:
      var3 = 0x00000000;
    }
    else
    {
      var5 = ((int *) var1)[652];
      var6 = ((int *) var5)[206];
      if (!(arg2 != var6))
      {
        var7 = ((unsigned char *) var1)[272];
        if (var7 == 0x00000000)
        {
          var3 = 0x00000000;
        }
        else
        {
          var8 = ((int *) var1)[48];
          if ((var8 & 0x00000200) != 0x00000000)
          {
            var3 = 0x00000000;
          }
          else
          {
            var9 = ((unsigned char *) var1)[275];
            if (!(var9 == 0x00000000))
            {
              var3 = 0x00000000;
            }
          }
        }
      }
    }
  }
  else
  goto label12;
  return var3;
}

/**
 * Subroutine at address 0x0001C918
 */
int sub_1C918 (int arg1, int arg2)
{
  var1 = ((int *) arg1)[663];
  var2 = 0x00000000;
  if (!((var1 & 0x00000080) == 0x00000000))
  {
    var3 = ((unsigned char *) arg1)[3328];
    if (!(var3 != 0x00000000))
    {
      var4 = ((int *) arg1)[833];
      var2 = ((var4 < arg2)) ^ 0x00000001;
    }
  }
  return var2;
}

/**
 * Subroutine at address 0x0001C948
 */
int sub_1C948 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = arg2;
  var4 = sceVshBridge_A71BF332 ();
  var5 = var4;
  if (var1 != 0x00000000)
  {
    var6 = 0x00000000;
    if (!(var1 != 0x00000001))
    {
      var21 = sp;
      if (var5 <= 0)
      {

      label25:
        var6 = 0x00000001;
      }
      else
      {
        var22 = sp + 0x00000004;
        var23 = sp + 0x00000008;
        var26 = sceVshBridge_1FD498B6 (var21, var22, var23);
        var27 = ((int *) sp)[0];
        var6 = 0x00000000;
        if (!(var27 != 0x00000000))
        {
          var6 = 0x00000001;
        }
      }
    }

  label26:
    ra = ((int *) sp)[6];
  }
  else
  {
    var6 = 0x00000001;
    if (var4 <= 0)
      goto label26;
    var9 = vsh_1B1CE2CF ();
    if (!(var9 != 0x00000000))
      goto label25;
    var14 = scePaf_2338483F ();
    var17 = scePaf_553637C4 (var14);
    var20 = sceVshBridge_639C3CB3 (0x00004000);
    var6 = (var5 >> 2) & 0x00000001;
    if (var17 == 0x00000001)
      goto label26;
    if (var20 != 0x00000001)
    {
      var6 = 0x00000001;
      goto label26;
    }
    else
    {
      ra = ((int *) sp)[6];
    }
  }
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x0001CA08
 */
void sub_1CA08 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  var3 = var1 + 0x00000140;
  sub_20978 (arg1);
  while (1) {
    var6 = ((int *) var1)[652];
    var9 = scePaf_BE7032D1 (var6, var2);
    var12 = sub_1B68C (var1, var2, var9);
    if (var12 == 0x00000000)
    {

    label13:
      ((int *) var3)[0] = 0x00000003;
    }
    else
    {
      var13 = ((unsigned char *) var12)[4];
      if (var13 == 0x00000002)
      {
        ((int *) var3)[0] = 0x00000001;
      }
      else
      {
        if (!(var13 == 0x00000003))
          goto label13;
        ((int *) var3)[0] = 0x00000002;
      }
    }
    var2 = var2 + 0x00000001;
    var3 = var3 + 0x00000004;
    if (((var2 < 0x00000008)) != 0x00000000)
      continue;
    break;
  }
  ra = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001CAA8
 */
void sub_1CAA8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  sub_1D444 (arg1);
  var4 = ((unsigned char *) var1)[3673];
  ra = ((int *) sp)[4];
  if (var4 != 0x00000000)
  {

  label189:
    var34 = ((int *) sp)[3];
  }
  else
  {
    ((char *) var1)[3673] = 0x00000001;
    var5 = var1;
    var6 = 0x00000001;
    while (1) {
      var7 = ((unsigned char *) var5)[256];
      var6 = var6 + 0xFFFFFFFF;
      if (var7 == 0x00000002)
      {
        var237 = 0x42C7CCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42C7CCCD));
        ((int *) var5)[64] = 0x00000000;
        __asm__ ("swc1       $fpr00, 264($v1);"
          : 
          : "=r"(var5));
      }
      var5 = var5 + 0x00000004;
      if (var6 >= 0)
        continue;
      break;
    }
    var8 = ((int *) var1)[663];
    if ((var8 & 0x00000020) == 0x00000000)
    {
      var20 = var8 & 0x00000040;
    }
    else
    {
      var9 = ((int *) var1)[725];
      var10 = 0x00046060;
      if (!(var9 == 0x00000001))
      {
        var10 = 0x00045F48;
      }
      var13 = sub_1C468 (var1, 0x00000002, var10);
      var14 = var13;
      var17 = sub_1C838 (var1, 0x00000002);
      if (var17 != 0x00000000)
      {
        var201 = ((int *) var1)[652];
        var204 = scePaf_BE7032D1 (var201, 0x00000002);
        if ((((var204 - var14) < 0xFFFFFFFF)) == 0x00000000)
        {
          var231 = ((int *) var1)[652];

        label27:
          var232 = ((int *) var231)[216];
          var233 = ((int *) var232)[2];
          scePaf_E2AFAB23 (var233, var14, var14);
          var236 = ((int *) var1)[652];
        }
        else
        {
          var205 = ((int *) var1)[652];
          var208 = scePaf_BE7032D1 (var205, 0x00000002);
          if ((((var208 - var14) < 0x00000002)) != 0x00000000)
          {
            var231 = ((int *) var1)[652];
            goto label27;
          }
          else
          {
            var209 = ((int *) var1)[652];
          }
        }
        while (1) {
          var212 = scePaf_BE7032D1 (var209, 0x00000002);
          var213 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var212 < var14)) == 0x00000000)
            break;
          var214 = ((int *) var1)[652];
          var215 = ((int *) var214)[216];
          var216 = ((int *) var215)[2];
          scePaf_905DDBE2 (var216, 0x00000000);
          var219 = ((int *) var1)[652];
          continue;
        }
        var220 = ((int *) var1)[652];
        while (1) {
          var223 = scePaf_BE7032D1 (var220, 0x00000002);
          var224 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var14 < var223)) == 0x00000000)
            break;
          var225 = ((int *) var1)[652];
          var226 = ((int *) var225)[216];
          var227 = ((int *) var226)[2];
          scePaf_9B240657 (var227, 0x00000000);
          var230 = ((int *) var1)[652];
          continue;
        }
        ((int *) var1)[82] = 0x00000001;
      }
      var18 = ((int *) var1)[652];
      var19 = ((int *) var18)[206];
      if (0x00000002 == var19)
      {
        var195 = sceVshCommonGui_414454B7 ();
        if (var195 == 0x00000000)
        {
          var8 = ((int *) var1)[663];
        }
        else
        {
          var196 = ((int *) var1)[652];
          __asm__ ("mtc1       $zr, $fpr12;");
          var197 = ((int *) var196)[216];
          var198 = ((int *) var197)[2];
          scePaf_676BAC3B (var198);
          var8 = ((int *) var1)[663];
        }
      }
      else
      {
        var8 = ((int *) var1)[663];
      }
      var20 = var8 & 0x00000040;
    }
    if (var20 == 0x00000000)
    {
      var32 = var8 & 0x00000010;
    }
    else
    {
      var21 = ((int *) var1)[780];
      var22 = ((var21 ^ 0x00000008)) ? 0x00000003 : 0x00000002;
      var25 = sub_1C468 (var1, var22, 0x000460EC);
      var26 = var25;
      var29 = sub_1C838 (var1, var22);
      if (var29 != 0x00000000)
      {
        var156 = ((int *) var1)[652];
        var159 = scePaf_BE7032D1 (var156, var22);
        if ((((var159 - var26) < 0xFFFFFFFF)) == 0x00000000)
        {
          var187 = ((int *) var1)[652];

        label71:
          var161 = var22 << 0x00000002;
          var188 = ((int *) var187)[216];
          var189 = ((int *) (var188 + var161))[0];
          scePaf_E2AFAB23 (var189, var26, var26);
          var192 = ((int *) var1)[652];
        }
        else
        {
          var160 = ((int *) var1)[652];
          var161 = var22 << 0x00000002;
          var164 = scePaf_BE7032D1 (var160, var22);
          if ((((var164 - var26) < 0x00000002)) != 0x00000000)
          {
            var187 = ((int *) var1)[652];
            goto label71;
          }
          else
          {
            var165 = ((int *) var1)[652];
          }
        }
        while (1) {
          var168 = scePaf_BE7032D1 (var165, var22);
          var169 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var168 < var26)) == 0x00000000)
            break;
          var170 = ((int *) var1)[652];
          var171 = ((int *) var170)[216];
          var172 = ((int *) (var171 + var161))[0];
          scePaf_905DDBE2 (var172, 0x00000000);
          var175 = ((int *) var1)[652];
          continue;
        }
        var176 = ((int *) var1)[652];
        while (1) {
          var179 = scePaf_BE7032D1 (var176, var22);
          var180 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var26 < var179)) == 0x00000000)
            break;
          var181 = ((int *) var1)[652];
          var182 = ((int *) var181)[216];
          var183 = ((int *) (var182 + var161))[0];
          scePaf_9B240657 (var183, 0x00000000);
          var186 = ((int *) var1)[652];
          continue;
        }
        ((int *) (var161 + var1))[80] = 0x00000001;
      }
      var30 = ((int *) var1)[652];
      var31 = ((int *) var30)[206];
      if (var22 == var31)
      {
        var150 = sceVshCommonGui_414454B7 ();
        if (var150 == 0x00000000)
        {
          var8 = ((int *) var1)[663];
        }
        else
        {
          var151 = ((int *) var1)[652];
          __asm__ ("mtc1       $zr, $fpr12;");
          var152 = ((int *) var151)[216];
          var153 = ((int *) (var152 + (var22 << 0x00000002)))[0];
          scePaf_676BAC3B (var153);
          var8 = ((int *) var1)[663];
        }
      }
      else
      {
        var8 = ((int *) var1)[663];
      }
      var32 = var8 & 0x00000010;
    }
    if (var32 != 0x00000000)
    {
      var97 = sub_1C468 (var1, 0x00000005, 0x0004631C);
      var98 = var97;
      var101 = sub_1C838 (var1, 0x00000005);
      if (var101 != 0x00000000)
      {
        var112 = ((int *) var1)[652];
        var115 = scePaf_BE7032D1 (var112, 0x00000005);
        if ((((var115 - var98) < 0xFFFFFFFF)) == 0x00000000)
        {
          var142 = ((int *) var1)[652];

        label113:
          var143 = ((int *) var142)[216];
          var144 = ((int *) var143)[5];
          scePaf_E2AFAB23 (var144, var98, var98);
          var147 = ((int *) var1)[652];
        }
        else
        {
          var116 = ((int *) var1)[652];
          var119 = scePaf_BE7032D1 (var116, 0x00000005);
          if ((((var119 - var98) < 0x00000002)) != 0x00000000)
          {
            var142 = ((int *) var1)[652];
            goto label113;
          }
          else
          {
            var120 = ((int *) var1)[652];
          }
        }
        while (1) {
          var123 = scePaf_BE7032D1 (var120, 0x00000005);
          var124 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var123 < var98)) == 0x00000000)
            break;
          var125 = ((int *) var1)[652];
          var126 = ((int *) var125)[216];
          var127 = ((int *) var126)[5];
          scePaf_905DDBE2 (var127, 0x00000000);
          var130 = ((int *) var1)[652];
          continue;
        }
        var131 = ((int *) var1)[652];
        while (1) {
          var134 = scePaf_BE7032D1 (var131, 0x00000005);
          var135 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var98 < var134)) == 0x00000000)
            break;
          var136 = ((int *) var1)[652];
          var137 = ((int *) var136)[216];
          var138 = ((int *) var137)[5];
          scePaf_9B240657 (var138, 0x00000000);
          var141 = ((int *) var1)[652];
          continue;
        }
        ((int *) var1)[85] = 0x00000001;
      }
      var102 = ((int *) var1)[652];
      var103 = ((int *) var102)[206];
      if (0x00000005 == var103)
      {
        var106 = sceVshCommonGui_414454B7 ();
        if (var106 == 0x00000000)
        {
          var8 = ((int *) var1)[663];
        }
        else
        {
          var107 = ((int *) var1)[652];
          __asm__ ("mtc1       $zr, $fpr12;");
          var108 = ((int *) var107)[216];
          var109 = ((int *) var108)[5];
          scePaf_676BAC3B (var109);
          var8 = ((int *) var1)[663];
        }
      }
      else
      {
        var8 = ((int *) var1)[663];
      }
    }
    ra = ((int *) sp)[4];
    if ((var8 & 0x00000080) == 0x00000000)
      goto label189;
    var33 = ((unsigned char *) var1)[3328];
    if (var33 == 0x00000000)
    {
      var40 = sub_1C468 (var1, 0x00000005, 0x00046434);
      var41 = ((int *) var1)[663];
      var42 = var40;
      if (var41 == 0x00000080)
      {

      label149:
        var43 = var1;

      label150:
        var48 = sub_1C838 (var43, 0x00000005);
        if (var48 != 0x00000000)
        {
          var59 = ((int *) var1)[652];
          var62 = scePaf_BE7032D1 (var59, 0x00000005);
          if ((((var62 - var42) < 0xFFFFFFFF)) == 0x00000000)
          {
            var89 = ((int *) var1)[652];

          label162:
            var90 = ((int *) var89)[216];
            var91 = ((int *) var90)[5];
            scePaf_E2AFAB23 (var91, var42, var42);
            var94 = ((int *) var1)[652];
          }
          else
          {
            var63 = ((int *) var1)[652];
            var66 = scePaf_BE7032D1 (var63, 0x00000005);
            if ((((var66 - var42) < 0x00000002)) != 0x00000000)
            {
              var89 = ((int *) var1)[652];
              goto label162;
            }
            else
            {
              var67 = ((int *) var1)[652];
            }
          }
          while (1) {
            var70 = scePaf_BE7032D1 (var67, 0x00000005);
            var71 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            if (((var70 < var42)) == 0x00000000)
              break;
            var72 = ((int *) var1)[652];
            var73 = ((int *) var72)[216];
            var74 = ((int *) var73)[5];
            scePaf_905DDBE2 (var74, 0x00000000);
            var77 = ((int *) var1)[652];
            continue;
          }
          var78 = ((int *) var1)[652];
          while (1) {
            var81 = scePaf_BE7032D1 (var78, 0x00000005);
            var82 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            if (((var42 < var81)) == 0x00000000)
              break;
            var83 = ((int *) var1)[652];
            var84 = ((int *) var83)[216];
            var85 = ((int *) var84)[5];
            scePaf_9B240657 (var85, 0x00000000);
            var88 = ((int *) var1)[652];
            continue;
          }
          ((int *) var1)[85] = 0x00000001;
        }
        var49 = ((int *) var1)[652];
        var50 = ((int *) var49)[206];
        ra = ((int *) sp)[4];
        if (!(0x00000005 != var50))
        {
          var53 = sceVshCommonGui_414454B7 ();
          if (var53 == 0x00000000)
          {
            ra = ((int *) sp)[4];
          }
          else
          {
            var54 = ((int *) var1)[652];
            __asm__ ("mtc1       $zr, $fpr12;");
            var55 = ((int *) var54)[216];
            var56 = ((int *) var55)[5];
            scePaf_676BAC3B (var56);
            ra = ((int *) sp)[4];
          }
        }
        goto label189;
      }
      else
      {
        var43 = var1;
        if ((var41 & 0x00000010) == 0x00000000)
          goto label150;
        var44 = ((int *) var1)[77];
        ra = ((int *) sp)[4];
        if (var44 != 0x00000017)
          goto label189;
        var45 = ((unsigned char *) var1)[284];
        if (!(var45 != 0x00000000))
          goto label149;
        var34 = ((int *) sp)[3];
      }
    }
    else
    {
      ra = ((int *) sp)[4];
      goto label189;
    }
  }
  var35 = ((int *) sp)[2];
  var36 = ((int *) sp)[1];
  var37 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001D0D0
 */
void sub_1D0D0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_1D444 (arg1);
  var4 = ((unsigned char *) var1)[3673];
  ra = ((int *) sp)[1];
  if (var4 != 0x00000000)
  {
    sub_21448 (var1, (var1 + 0x00000A54));
    sub_21B74 (var1);
    var10 = ((int *) var1)[653];
    if (var10 != 0x00000000)
    {
      __asm__ ("mtc1       $zr, $fpr13;");
      var38 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      sub_09450 (var10);
      var41 = ((int *) var1)[893];
    }
    else
    {
      var11 = ((int *) var1)[893];
    }
    var14 = scePaf_11FA6015 (var11, "page_info");
    if (var14 == 0x00000000)
    {

    label22:
      var16 = ((int *) var1)[893];
      var19 = scePaf_11FA6015 (var16, "page_optionmenu");
      if (var19 == 0x00000000)
      {

      label30:
      }
      else
      {
        var20 = ((int *) var1)[49];
        if (!(var20 == 0x00000001))
          goto label30;
        sub_266CC (var19);
      }
    }
    else
    {
      var15 = ((int *) var1)[49];
      if (!(var15 == 0x00000001))
        goto label22;
      sub_25FD0 (var14);
    }
    sub_1D218 (var1, 0x00000002, 0x00000002);
    sub_1D218 (var1, 0x00000003, 0x00000002);
    sub_1D218 (var1, 0x00000005, 0x00000002);
    sub_21F04 (var1, 0x00000001);
    var29 = ((int *) var1)[48];
    var30 = ((int *) var1)[652];
    ((int *) var1)[48] = (var29 | 0x00000200);
    var31 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_DE0E0F8B (var30, 0x00000072, 0x0001D4EC, var1);
    ra = ((int *) sp)[1];
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001D218
 */
void sub_1D218 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[21] = s5;
  ((int *) sp)[20] = s4;
  var1 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
  ((int *) sp)[19] = s3;
  var2 = 0x00000000;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  var3 = arg3;
  ((int *) sp)[16] = s0;
  var4 = 0x00000000;
  ((int *) sp)[22] = ra;
  var5 = ((int *) var1)[894];
  var6 = ((int *) var5)[1];
  ((int *) sp)[0] = var6;
  while (1) {
    var7 = ((int *) var1)[894];
    var8 = ((int *) sp)[0];
    var4 = var4 + 0x00000001;
    var9 = sp + 0x00000020;
    var10 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    ((int *) sp)[4] = var7;
    if (var8 == var7)
      break;
    var11 = ((int *) var8)[2];
    var12 = ((unsigned char *) var11)[4];
    if (((var3 < var12)) != 0x00000000)
    {
    }
    else
    {
      if (var12 == var3)
      {
        ((int *) sp)[8] = 0x00000000;
        var2 = var2 + 0x00000001;
        __asm__ ("lwc1       $fpr13, 32($sp);");
        var15 = ((int *) arg1)[652];
        __asm__ ("swc1       $fpr13, 36($sp);"
                 "swc1       $fpr13, 40($sp);"
          : 
          : "=r"(sp));
        __asm__ ("swc1       $fpr13, 44($sp);"
          : 
          : "=r"(sp));
        scePaf_E0BAFD21 (var15, arg2, var4, var9);
        var13 = ((int *) sp)[0];
      }
      else
      {
        var13 = ((int *) sp)[0];
      }
      ((int *) sp)[12] = var13;
      var14 = ((int *) var13)[1];
      ((int *) sp)[0] = var14;
      continue;
    }
    goto label7;
  }

label7:
  ra = ((int *) sp)[22];
  var18 = ((int *) sp)[21];
  var19 = ((int *) sp)[20];
  var20 = ((int *) sp)[19];
  var21 = ((int *) sp)[18];
  var22 = ((int *) sp)[17];
  var23 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0001D310
 */
void sub_1D310 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s6;
  ((int *) sp)[21] = s5;
  var1 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
  var2 = 0x00000000;
  ((int *) sp)[20] = s4;
  var3 = arg1;
  ((int *) sp)[19] = s3;
  var4 = 0x00000000;
  ((int *) sp)[18] = s2;
  var5 = arg2;
  ((int *) sp)[17] = s1;
  var6 = arg3;
  ((int *) sp)[16] = s0;
  var7 = var1;
  ((int *) sp)[23] = ra;
  var8 = ((int *) var1)[894];
  var9 = ((int *) var8)[1];
  ((int *) sp)[0] = var9;
  while (1) {
    var10 = ((int *) var7)[894];

    label4:
    while (1) {
      var11 = ((int *) sp)[0];
      ((int *) sp)[4] = var10;
      if (var11 == var10)
        break;
      var12 = ((int *) var11)[2];
      var13 = ((unsigned char *) var12)[4];
      if (((var6 < var13)) != 0x00000000)
      {
      }
      else
      {
        if (var13 == var6)
        {
          var2 = var2 + 0x00000001;
          __asm__ ("mtc1       $zr, $fpr12;");
          __asm__ ("mov.s      $fpr13, $fpr12;");
          if (var13 == 0x00000002)
          {
            var25 = ((int *) var3)[652];
            scePaf_643C10AF (var25, var5, var4);
            var15 = ((int *) sp)[0];
          }
          else
          {
            var15 = ((int *) sp)[0];
          }
          var16 = sp + 0x00000020;
          var17 = sp + 0x00000030;
          ((int *) sp)[12] = var15;
          sub_33884 (var16, (var7 + 0x00000DF8), var17);
          __asm__ ("mtc1       $zr, $fpr12;");
          var20 = ((int *) var7)[894];
          var21 = ((int *) var3)[652];
          var22 = ((int *) var20)[1];
          var4 = 0x00000000;
          ((int *) sp)[0] = var22;
          ((int *) sp)[12] = var22;
          scePaf_08CA8950 (var21, var5, var4);
          var10 = ((int *) var7)[894];
          continue;
        }
        else
        {
          ((int *) sp)[12] = var11;
          var4 = var4 + 0x00000001;
          var14 = ((int *) var11)[1];
          ((int *) sp)[0] = var14;
          continue;
        }
        goto label4;
      }
      goto label8;
    }
  }

label8:
  ra = ((int *) sp)[23];
  var28 = ((int *) sp)[22];
  var29 = ((int *) sp)[21];
  var30 = ((int *) sp)[20];
  var31 = ((int *) sp)[19];
  var32 = ((int *) sp)[18];
  var33 = ((int *) sp)[17];
  var34 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0001D444
 */
void sub_1D444 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[652];
  var5 = scePaf_ED055C3C (var2, 0x00000072);
  var6 = 0x00000000;
  if (var5 != 0x00000000)
  {
    var8 = ((int *) var1)[652];
    sub_1D4EC (var8, 0x00000000, 0x00000000, var1);
    var6 = 0x00000001;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001D498
 */
void sub_1D498 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[652];
  var5 = scePaf_ED055C3C (var2, 0x00000073);
  var6 = 0x00000000;
  if (var5 != 0x00000000)
  {
    var8 = ((int *) var1)[652];
    sub_1DDA8 (var8, 0x00000000, 0x00000000, var1);
    var6 = 0x00000001;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001D4EC
 */
void sub_1D4EC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[18] = s2;
  var1 = arg4;
  ((int *) sp)[19] = ra;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  var2 = ((int *) arg4)[653];
  ((int *) sp)[0] = 0x00000000;
  if (var2 != 0x00000000)
  {
    var27 = sp + 0x00000010;
    sub_32328 (var27, 0x00000000);
    var30 = ((int *) var1)[653];
    vsh_DA00CA52 (var30, var27, 0x00000002);
    var33 = ((int *) sp)[4];
    if (var33 == 0x00000000)
    {
      var36 = var27;
    }
    else
    {
      var34 = ((int *) var33)[1];
      var35 = var34 + 0xFFFFFFFF;
      ((int *) var33)[1] = var35;
      if (var35 <= 0)
      {
        var116 = ((int *) var33)[0];
        var117 = ((int *) var116)[1];
        var120 var121 = (*var117) (var33);
        var36 = var27;
      }
      else
      {
        var36 = var27;
      }
    }
    sub_32328 (var36, 0x00000000);
    var39 = ((int *) var1)[653];
    vsh_DA00CA52 (var39, var27, 0x00000003);
    var42 = ((int *) sp)[4];
    if (var42 == 0x00000000)
    {
      var45 = var27;
    }
    else
    {
      var43 = ((int *) var42)[1];
      var44 = var43 + 0xFFFFFFFF;
      ((int *) var42)[1] = var44;
      if (var44 <= 0)
      {
        var110 = ((int *) var42)[0];
        var111 = ((int *) var110)[1];
        var114 var115 = (*var111) (var42);
        var45 = var27;
      }
      else
      {
        var45 = var27;
      }
    }
    sub_32328 (var45, 0x00000000);
    var48 = ((int *) var1)[653];
    vsh_DA00CA52 (var48, var27, 0x00000005);
    var51 = ((int *) sp)[4];
    if (var51 == 0x00000000)
    {
      var54 = var27;
    }
    else
    {
      var52 = ((int *) var51)[1];
      var53 = var52 + 0xFFFFFFFF;
      ((int *) var51)[1] = var53;
      if (var53 <= 0)
      {
        var104 = ((int *) var51)[0];
        var105 = ((int *) var104)[1];
        var108 var109 = (*var105) (var51);
        var54 = var27;
      }
      else
      {
        var54 = var27;
      }
    }
    sub_32328 (var54, 0x00000000);
    var57 = ((int *) var1)[653];
    vsh_DA00CA52 (var57, var27, 0x00000006);
    var60 = ((int *) sp)[4];
    if (var60 == 0x00000000)
    {
      var63 = var27;
    }
    else
    {
      var61 = ((int *) var60)[1];
      var62 = var61 + 0xFFFFFFFF;
      ((int *) var60)[1] = var62;
      if (var62 <= 0)
      {
        var98 = ((int *) var60)[0];
        var99 = ((int *) var98)[1];
        var102 var103 = (*var99) (var60);
        var63 = var27;
      }
      else
      {
        var63 = var27;
      }
    }
    sub_32328 (var63, 0x00000000);
    var66 = ((int *) var1)[653];
    vsh_DA00CA52 (var66, var27, 0x00000007);
    var69 = ((int *) sp)[4];
    var70 = sp + 0x00000020;
    if (!(var69 == 0x00000000))
    {
      var71 = ((int *) var69)[1];
      var72 = var71 + 0xFFFFFFFF;
      ((int *) var69)[1] = var72;
      if (var72 <= 0)
      {
        var92 = ((int *) var69)[0];
        var93 = ((int *) var92)[1];
        var96 var97 = (*var93) (var69);
        var70 = sp + 0x00000020;
      }
      else
      {
        var70 = sp + 0x00000020;
      }
    }
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    sub_33618 (var70, 0x00000000);
    var75 = ((int *) var1)[653];
    sub_09AA4 (var75, var70, 0x00000008);
    sub_335E8 (var70);
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    sub_33618 (var70, 0x00000000);
    var82 = ((int *) var1)[653];
    sub_09AA4 (var82, var70, 0x00000009);
    sub_335E8 (var70);
    __asm__ ("mtc1       $zr, $fpr12;");
    var87 = ((int *) var1)[653];
    __asm__ ("mov.s      $fpr13, $fpr12;");
    vsh_8EFFA7C3 (var87);
    sub_1D7D0 (var1);
  }
  else
  {
  }
  sub_1D310 (var1, 0x00000002, 0x00000002);
  sub_1D310 (var1, 0x00000003, 0x00000002);
  sub_1D310 (var1, 0x00000005, 0x00000002);
  var11 = sceVshCommonGui_414454B7 ();
  if (!(var11 == 0x00000000))
  {
    var12 = ((unsigned char *) var1)[275];
    if (var12 != 0x00000000)
    {
      var21 = ((int *) var1)[652];
      __asm__ ("mtc1       $zr, $fpr12;");
      var22 = ((int *) var21)[206];
      var23 = ((int *) var21)[216];
      var24 = ((int *) (var23 + (var22 << 0x00000002)))[0];
      scePaf_676BAC3B (var24);
    }
  }
  sub_21B74 (var1);
  var15 = ((int *) var1)[48];
  ((int *) var1)[48] = ((var15 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
  sub_21F04 (var1, 0x00000000);
  ra = ((int *) sp)[19];
  var18 = ((int *) sp)[18];
  var19 = ((int *) sp)[17];
  var20 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0001D7D0
 */
void sub_1D7D0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[62];
  if ((((0x00000000 < (var1 ^ 0x00000009))) & ((0x00000000 < (var1 ^ 0x00000007)))) == 0x00000000)
  {
    ra = ((int *) sp)[0];
  }
  else
  {
    if (var1 == 0x0000000A)
    {
    }
    else
    {
      if (!(var1 == 0x00000012))
      {
        sceVshBridge_7E00040D (0x00000000);
      }
    }
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001D820
 */
void sub_1D820 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  sub_1D498 (arg1);
  var4 = ((unsigned char *) var1)[3674];
  ra = ((int *) sp)[2];
  if (!(var4 != 0x00000000))
  {
    ((char *) var1)[3674] = 0x00000001;
    var5 = var1;
    var6 = 0x00000001;
    while (1) {
      var7 = ((unsigned char *) var5)[256];
      var6 = var6 + 0xFFFFFFFF;
      if (var7 == 0x00000003)
      {
        var182 = 0x42C7CCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42C7CCCD));
        ((int *) var5)[64] = 0x00000000;
        __asm__ ("swc1       $fpr00, 264($v1);"
          : 
          : "=r"(var5));
      }
      var5 = var5 + 0x00000004;
      if (var6 >= 0)
        continue;
      break;
    }
    var10 = sub_1C468 (var1, 0x00000001, 0x00045EBC);
    var13 = sub_1C8A8 (var1, 0x00000001);
    if (!(var13 == 0x00000000))
    {
      var14 = ((int *) var1)[652];
      var15 = MAX (var10, 0x00000000);
      var18 = scePaf_BE7032D1 (var14, 0x00000001);
      if ((((var18 - var15) < 0xFFFFFFFF)) == 0x00000000)
      {
        var176 = ((int *) var1)[652];

      label22:
        var177 = ((int *) var176)[216];
        var178 = ((int *) var177)[1];
        scePaf_E2AFAB23 (var178, var15, var15);
        var181 = ((int *) var1)[652];
      }
      else
      {
        var19 = ((int *) var1)[652];
        var22 = scePaf_BE7032D1 (var19, 0x00000001);
        if ((((var22 - var15) < 0x00000002)) != 0x00000000)
        {
          var176 = ((int *) var1)[652];
          goto label22;
        }
        else
        {
          var23 = ((int *) var1)[652];
        }
      }
      while (1) {
        var26 = scePaf_BE7032D1 (var23, 0x00000001);
        var27 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var26 < var15)) == 0x00000000)
          break;
        var28 = ((int *) var1)[652];
        var29 = ((int *) var28)[216];
        var30 = ((int *) var29)[1];
        scePaf_905DDBE2 (var30, 0x00000000);
        var33 = ((int *) var1)[652];
        continue;
      }
      var34 = ((int *) var1)[652];
      while (1) {
        var37 = scePaf_BE7032D1 (var34, 0x00000001);
        var38 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var15 < var37)) == 0x00000000)
          break;
        var39 = ((int *) var1)[652];
        var40 = ((int *) var39)[216];
        var41 = ((int *) var40)[1];
        scePaf_9B240657 (var41, 0x00000000);
        var44 = ((int *) var1)[652];
        continue;
      }
      ((int *) var1)[81] = 0x00000000;
    }
    var47 = sub_1C468 (var1, 0x00000002, 0x00045FD4);
    var50 = sub_1C8A8 (var1, 0x00000002);
    if (!(var50 == 0x00000000))
    {
      var51 = ((int *) var1)[652];
      var52 = MAX (var47, 0x00000000);
      var55 = scePaf_BE7032D1 (var51, 0x00000002);
      if ((((var55 - var52) < 0xFFFFFFFF)) == 0x00000000)
      {
        var170 = ((int *) var1)[652];

      label47:
        var171 = ((int *) var170)[216];
        var172 = ((int *) var171)[2];
        scePaf_E2AFAB23 (var172, var52, var52);
        var175 = ((int *) var1)[652];
      }
      else
      {
        var56 = ((int *) var1)[652];
        var59 = scePaf_BE7032D1 (var56, 0x00000002);
        if ((((var59 - var52) < 0x00000002)) != 0x00000000)
        {
          var170 = ((int *) var1)[652];
          goto label47;
        }
        else
        {
          var60 = ((int *) var1)[652];
        }
      }
      while (1) {
        var63 = scePaf_BE7032D1 (var60, 0x00000002);
        var64 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var63 < var52)) == 0x00000000)
          break;
        var65 = ((int *) var1)[652];
        var66 = ((int *) var65)[216];
        var67 = ((int *) var66)[2];
        scePaf_905DDBE2 (var67, 0x00000000);
        var70 = ((int *) var1)[652];
        continue;
      }
      var71 = ((int *) var1)[652];
      while (1) {
        var74 = scePaf_BE7032D1 (var71, 0x00000002);
        var75 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var52 < var74)) == 0x00000000)
          break;
        var76 = ((int *) var1)[652];
        var77 = ((int *) var76)[216];
        var78 = ((int *) var77)[2];
        scePaf_9B240657 (var78, 0x00000000);
        var81 = ((int *) var1)[652];
        continue;
      }
      ((int *) var1)[82] = 0x00000000;
    }
    var84 = sub_1C468 (var1, 0x00000003, 0x00046178);
    var87 = sub_1C8A8 (var1, 0x00000003);
    if (!(var87 == 0x00000000))
    {
      var88 = ((int *) var1)[652];
      var89 = MAX (var84, 0x00000000);
      var92 = scePaf_BE7032D1 (var88, 0x00000003);
      if ((((var92 - var89) < 0xFFFFFFFF)) == 0x00000000)
      {
        var164 = ((int *) var1)[652];

      label72:
        var165 = ((int *) var164)[216];
        var166 = ((int *) var165)[3];
        scePaf_E2AFAB23 (var166, var89, var89);
        var169 = ((int *) var1)[652];
      }
      else
      {
        var93 = ((int *) var1)[652];
        var96 = scePaf_BE7032D1 (var93, 0x00000003);
        if ((((var96 - var89) < 0x00000002)) != 0x00000000)
        {
          var164 = ((int *) var1)[652];
          goto label72;
        }
        else
        {
          var97 = ((int *) var1)[652];
        }
      }
      while (1) {
        var100 = scePaf_BE7032D1 (var97, 0x00000003);
        var101 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var100 < var89)) == 0x00000000)
          break;
        var102 = ((int *) var1)[652];
        var103 = ((int *) var102)[216];
        var104 = ((int *) var103)[3];
        scePaf_905DDBE2 (var104, 0x00000000);
        var107 = ((int *) var1)[652];
        continue;
      }
      var108 = ((int *) var1)[652];
      while (1) {
        var111 = scePaf_BE7032D1 (var108, 0x00000003);
        var112 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var89 < var111)) == 0x00000000)
          break;
        var113 = ((int *) var1)[652];
        var114 = ((int *) var113)[216];
        var115 = ((int *) var114)[3];
        scePaf_9B240657 (var115, 0x00000000);
        var118 = ((int *) var1)[652];
        continue;
      }
      ((int *) var1)[83] = 0x00000000;
    }
    var121 = sub_1C468 (var1, 0x00000005, 0x000463A8);
    var124 = sub_1C8A8 (var1, 0x00000005);
    if (var124 == 0x00000000)
    {
      ((char *) var1)[285] = 0x00000000;
    }
    else
    {
      var125 = ((int *) var1)[652];
      var126 = MAX (var121, 0x00000000);
      var129 = scePaf_BE7032D1 (var125, 0x00000005);
      if ((((var129 - var126) < 0xFFFFFFFF)) == 0x00000000)
      {
        var158 = ((int *) var1)[652];

      label98:
        var159 = ((int *) var158)[216];
        var160 = ((int *) var159)[5];
        scePaf_E2AFAB23 (var160, var126, var126);
        var163 = ((int *) var1)[652];
      }
      else
      {
        var130 = ((int *) var1)[652];
        var133 = scePaf_BE7032D1 (var130, 0x00000005);
        if ((((var133 - var126) < 0x00000002)) != 0x00000000)
        {
          var158 = ((int *) var1)[652];
          goto label98;
        }
        else
        {
          var134 = ((int *) var1)[652];
        }
      }
      while (1) {
        var137 = scePaf_BE7032D1 (var134, 0x00000005);
        var138 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var137 < var126)) == 0x00000000)
          break;
        var139 = ((int *) var1)[652];
        var140 = ((int *) var139)[216];
        var141 = ((int *) var140)[5];
        scePaf_905DDBE2 (var141, 0x00000000);
        var144 = ((int *) var1)[652];
        continue;
      }
      var145 = ((int *) var1)[652];
      while (1) {
        var148 = scePaf_BE7032D1 (var145, 0x00000005);
        var149 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var126 < var148)) == 0x00000000)
          break;
        var150 = ((int *) var1)[652];
        var151 = ((int *) var150)[216];
        var152 = ((int *) var151)[5];
        scePaf_9B240657 (var152, 0x00000000);
        var155 = ((int *) var1)[652];
        continue;
      }
      ((int *) var1)[85] = 0x00000000;
      ((char *) var1)[285] = 0x00000000;
    }
    ra = ((int *) sp)[2];
  }
  var156 = ((int *) sp)[1];
  var157 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001DC8C
 */
void sub_1DC8C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) arg1)[3674];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) arg1)[893];
    var7 = scePaf_11FA6015 (var4, "page_info", arg3);
    if (var7 == 0x00000000)
    {

    label10:
      var9 = ((int *) var1)[893];
      var12 = scePaf_11FA6015 (var9, "page_optionmenu", 0x00000000);
      if (!(var12 == 0x00000000))
      {
        var13 = ((int *) var1)[49];
        if (var13 == 0x00000002)
        {
          sub_266CC (var12);
        }
        else
        {
        }
      }
    }
    else
    {
      var8 = ((int *) var1)[49];
      if (!(var8 == 0x00000002))
        goto label10;
      sub_25FD0 (var7);
    }
    sub_1D218 (var1, 0x00000001, 0x00000003);
    sub_1D218 (var1, 0x00000002, 0x00000003);
    sub_1D218 (var1, 0x00000003, 0x00000003);
    sub_1D218 (var1, 0x00000005, 0x00000003);
    sub_21F04 (var1, 0x00000001);
    sub_21424 (var1);
    var26 = ((int *) var1)[652];
    var27 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_DE0E0F8B (var26, 0x00000073, 0x0001DDA8, var1);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001DDA8
 */
void sub_1DDA8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg4;
  ((int *) sp)[5] = ra;
  ((int *) sp)[0] = 0x00000000;
  sub_1D310 (arg4, 0x00000001, 0x00000003);
  sub_1D310 (var1, 0x00000002, 0x00000003);
  sub_1D310 (var1, 0x00000003, 0x00000003);
  sub_1D310 (var1, 0x00000005, 0x00000003);
  var12 = sceVshCommonGui_414454B7 ();
  var13 = var1;
  if (!(var12 == 0x00000000))
  {
    var14 = ((unsigned char *) var1)[275];
    __asm__ ("mtc1       $zr, $fpr12;");
    if (var14 != 0x00000000)
    {
      var18 = ((int *) var1)[652];
      var19 = ((int *) var18)[206];
      var20 = ((int *) var18)[216];
      var21 = ((int *) (var20 + (var19 << 0x00000002)))[0];
      scePaf_676BAC3B (var21);
      var13 = var1;
    }
  }
  sub_21F04 (var13, 0x00000000);
  ra = ((int *) sp)[5];
  var17 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001DE54
 */
void sub_1DE54 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFE70;
  ((int *) sp)[92] = s4;
  var1 = arg3;
  ((int *) sp)[91] = s3;
  var2 = arg2;
  ((int *) sp)[90] = s2;
  ((int *) sp)[97] = ra;
  ((int *) sp)[96] = fp;
  ((int *) sp)[95] = s7;
  ((int *) sp)[94] = s6;
  ((int *) sp)[93] = s5;
  ((int *) sp)[89] = s1;
  ((int *) sp)[88] = s0;
  var3 = ((int *) arg1)[652];
  var4 = arg1;
  if (var3 == 0x00000000)
  {

  label223:
    ra = ((int *) sp)[97];

  label224:
    var10 = ((int *) sp)[96];
  }
  else
  {
    var5 = ((int *) var3)[205];
    if (((var5 < arg2)) != 0x00000000)
    {
      ra = ((int *) sp)[97];
      goto label224;
    }
    else
    {
      var6 = 0xFFFFFFFF;
      if (!(arg2 < 0))
      {
        if (((arg2 < var5)) == 0x00000000)
        {
          var6 = 0xFFFFFFFF;
        }
        else
        {
          var7 = ((int *) var3)[216];
          var8 = ((int *) (var7 + (arg2 << 0x00000002)))[0];
          var6 = ((int *) var8)[204];
        }
      }
      ra = ((int *) sp)[97];
      if (((var6 < var1)) != 0x00000000)
        goto label224;
      var9 = ((int *) var4)[893];
      var10 = ((int *) sp)[96];
      if (!(var9 == 0x00000000))
      {
        var11 = arg4;
        if (arg4 == 0x00000000)
        {
          var370 = var2 << 0x00000001;
          var371 = ((int *) (var4 + ((var370 + var2) << 0x00000002)))[894];
          var372 = sp;
          var373 = var1;
          var374 = ((int *) var371)[1];
          ((int *) sp)[0] = var374;
          if (!(var1 <= 0))
          {
            while (1) {
              var375 = ((int *) var372)[0];
              var373 = var373 + 0xFFFFFFFF;
              var376 = ((int *) var375)[1];
              ((int *) var372)[0] = var376;
              if (var373 > 0)
                continue;
              break;
            }
          }
          var377 = ((int *) (var4 + ((var370 + var2) << 0x00000002)))[894];
          var378 = ((int *) sp)[0];
          ((int *) sp)[4] = var377;
          if (var378 == var377)
            goto label223;
          var11 = ((int *) var378)[2];

        label16:
          var12 = ((unsigned char *) var11)[29];
          var13 = ((int *) var3)[0];
          if (var12 == 0x00000000)
          {
            var14 = var2 << 0x00000018;
            var15 = var1 << 0x00000010;
            var311 = ((int *) var13)[28];
            var312 = var14 | var15;
            var23 = sp + 0x00000020;
            var315 var316 = (*var311) (var3, (var312 | 0x00000034), 0x00000001, arg4, var3, arg6, arg7, arg8);
            sub_32328 (var23, 0x00000000);
            var319 = ((int *) var4)[652];
            ((int *) sp)[84] = var14;
            var320 = ((int *) var319)[0];
            var321 = var15;
            var322 = ((int *) var320)[43];
            var323 = var23;
            var326 var327 = (*var322) (var319, var23, (var312 | 0x0000000A));
            var328 = ((int *) sp)[8];
            if (var328 == 0x00000000)
            {
              var331 = var323;
            }
            else
            {
              var329 = ((int *) var328)[1];
              var330 = var329 + 0xFFFFFFFF;
              ((int *) var328)[1] = var330;
              if (var330 <= 0)
              {
                var364 = ((int *) var328)[0];
                var365 = ((int *) var364)[1];
                var368 var369 = (*var365) (var328);
                var331 = var323;
              }
              else
              {
                var331 = var323;
              }
            }
            sub_32328 (var331, 0x00000000);
            var334 = ((int *) var4)[652];
            var335 = ((int *) sp)[84];
            var336 = ((int *) var334)[0];
            var337 = ((int *) var336)[43];
            var340 var341 = (*var337) (var334, var323, ((var335 | var321) | 0x0000000B));
            var342 = ((int *) sp)[8];
            var343 = sp + 0x00000030;
            if (!(var342 == 0x00000000))
            {
              var344 = ((int *) var342)[1];
              var345 = var344 + 0xFFFFFFFF;
              ((int *) var342)[1] = var345;
              if (var345 <= 0)
              {
                var358 = ((int *) var342)[0];
                var359 = ((int *) var358)[1];
                var362 var363 = (*var359) (var342);
                var343 = sp + 0x00000030;
              }
              else
              {
                var343 = sp + 0x00000030;
              }
            }
            ((int *) sp)[12] = 0x00000000;
            ((int *) sp)[13] = 0x00000000;
            sub_33618 (var343, 0x00000000);
            var348 = ((int *) sp)[84];
            var349 = ((int *) var4)[652];
            var350 = ((int *) var349)[0];
            var351 = ((int *) var350)[45];
            var354 var355 = (*var351) (var349, var343, ((var348 | var321) | 0x00000005));
            sub_335E8 (var343);
            var51 = ((int *) var4)[892];
          }
          else
          {
            var14 = var2 << 0x00000018;
            var15 = var1 << 0x00000010;
            var16 = ((int *) var13)[28];
            var17 = var14 | var15;
            var20 var21 = (*var16) (var3, (var17 | 0x00000034), 0x00000002, arg4, var3, arg6, arg7, arg8);
            var22 = ((int *) var4)[651];
            var23 = sp + 0x00000020;
            scePaf_047C9996 (var23, var22, "tex_line");
            var26 = ((int *) var4)[652];
            var27 = ((int *) var26)[0];
            var28 = ((int *) var27)[43];
            var31 var32 = (*var28) (var26, var23, (var17 | 0x0000000A));
            var33 = ((int *) sp)[8];
            if (var33 == 0x00000000)
            {
              var310 = ((int *) var4)[651];
            }
            else
            {
              var34 = ((int *) var33)[1];
              var35 = var34 + 0xFFFFFFFF;
              ((int *) var33)[1] = var35;
              if (var35 <= 0)
              {
                var303 = ((int *) var33)[0];
                var304 = ((int *) var303)[1];
                var307 var308 = (*var304) (var33);
                var309 = ((int *) var4)[651];
              }
              else
              {
                var36 = ((int *) var4)[651];
              }
            }
            var37 = sp + 0x00000020;
            scePaf_047C9996 (var37, var36, "tex_line_shadow");
            var40 = ((int *) var4)[652];
            var41 = ((int *) var40)[0];
            var42 = ((int *) var41)[43];
            var43 = sp + 0x00000020;
            var46 var47 = (*var42) (var40, var43, ((var14 | var15) | 0x0000000B));
            var48 = ((int *) sp)[8];
            if (var48 == 0x00000000)
            {
              var51 = ((int *) var4)[892];
            }
            else
            {
              var49 = ((int *) var48)[1];
              var50 = var49 + 0xFFFFFFFF;
              ((int *) var48)[1] = var50;
              if (var50 <= 0)
              {
                var297 = ((int *) var48)[0];
                var298 = ((int *) var297)[1];
                var301 var302 = (*var298) (var48);
                var51 = ((int *) var4)[892];
              }
              else
              {
                var51 = ((int *) var4)[892];
              }
            }
          }
          sub_23B40 (var23, var51, (var11 + 0x0000001F));
          var54 = ((int *) var4)[652];
          var55 = ((int *) var54)[0];
          var56 = ((int *) var55)[43];
          var59 var60 = (*var56) (var54, var23, (var14 | var15));
          var61 = ((int *) sp)[8];
          if (var61 == 0x00000000)
          {
            var64 = ((int *) var4)[892];
          }
          else
          {
            var62 = ((int *) var61)[1];
            var63 = var62 + 0xFFFFFFFF;
            ((int *) var61)[1] = var63;
            if (var63 <= 0)
            {
              var291 = ((int *) var61)[0];
              var292 = ((int *) var291)[1];
              var295 var296 = (*var292) (var61);
              var64 = ((int *) var4)[892];
            }
            else
            {
              var64 = ((int *) var4)[892];
            }
          }
          var65 = var11 + 0x00000037;
          sub_23B40 (var23, var64, var65);
          var68 = ((int *) var4)[652];
          var69 = ((int *) var68)[0];
          var70 = ((int *) var69)[43];
          var73 var74 = (*var70) (var68, var23, ((var14 | var15) | 0x0000000E));
          var75 = ((int *) sp)[8];
          if (var75 == 0x00000000)
          {
            var78 = ((int *) var4)[892];
          }
          else
          {
            var76 = ((int *) var75)[1];
            var77 = var76 + 0xFFFFFFFF;
            ((int *) var75)[1] = var77;
            if (var77 <= 0)
            {
              var285 = ((int *) var75)[0];
              var286 = ((int *) var285)[1];
              var289 var290 = (*var286) (var75);
              var78 = ((int *) var4)[892];
            }
            else
            {
              var78 = ((int *) var4)[892];
            }
          }
          sub_23B40 (var23, var78, (var11 + 0x0000004F));
          var81 = ((int *) var4)[652];
          var82 = ((int *) var81)[0];
          var83 = ((int *) var82)[43];
          var86 var87 = (*var83) (var81, var23, ((var14 | var15) | 0x00000007));
          var88 = ((int *) sp)[8];
          if (var88 == 0x00000000)
          {
            var91 = ((int *) var4)[892];
          }
          else
          {
            var89 = ((int *) var88)[1];
            var90 = var89 + 0xFFFFFFFF;
            ((int *) var88)[1] = var90;
            if (var90 <= 0)
            {
              var279 = ((int *) var88)[0];
              var280 = ((int *) var279)[1];
              var283 var284 = (*var280) (var88);
              var91 = ((int *) var4)[892];
            }
            else
            {
              var91 = ((int *) var4)[892];
            }
          }
          sub_23B40 (var23, var91, var65);
          var94 = ((int *) sp)[8];
          if (var94 != 0x00000000)
          {
            var268 = ((short *) var94)[13];
            var269 = ((short *) var94)[12];
            var270 = ((int *) var4)[652];
            var271 = var268 << 0x00000001;
            var272 = var269 << 0x00000001;
            __asm__ ("mtc1       $v0, $fpr1;"
                     "mtc1       $v1, $fpr0;"
              : 
              : "=r"(var271), "=r"(var272));
            var273 = ((int *) var270)[0];
            __asm__ ("cvt.s.w    $fpr03, $fpr01;"
                     "cvt.s.w    $fpr02, $fpr00;");
            ((int *) var4)[922] = 0x00000000;
            __asm__ ("swc1       $fpr02, 3680($s2);"
              : 
              : "=r"(var4));
            __asm__ ("swc1       $fpr03, 3684($s2);"
              : 
              : "=r"(var4));
            var274 = ((int *) var273)[34];
            var277 var278 = (*var274) (var270, ((var14 | var15) | 0x0000000E), 0x00000012, (var4 + 0x00000E60));
            var95 = ((int *) var11)[0];
          }
          else
          {
            var95 = ((int *) var11)[0];
          }
          if (var95 == 0x00000024)
          {
            sub_1EF20 (var4, 0x00000001, var2, var1);
            var267 = ((int *) var4)[893];
            var96 = sp + 0x00000130;

          label154:
            var100 = scePaf_970DC20D (var97, (var11 + 0x00000067));
            ((int *) sp)[76] = 0x00000000;
            ((int *) sp)[77] = 0x00000000;
            sub_33618 (var96, var100);
            var103 = ((int *) var4)[652];
            var104 = ((int *) var103)[0];
            var105 = ((int *) var104)[45];
            var108 var109 = (*var105) (var103, var96, ((var14 | var15) | 0x00000004));
            var110 = var96;
          }
          else
          {
            if (((var95 < 0x00000025)) == 0x00000000)
            {
              if (var95 == 0x00000025)
              {
                sub_1EF20 (var4, 0x00000001, var2, var1);
                var249 = ((int *) var4)[893];
                var252 = scePaf_970DC20D (var249, "msg_can_change_psn_account_psstore_setteing");
                var96 = sp + 0x00000130;
                ((int *) sp)[76] = 0x00000000;
                ((int *) sp)[77] = 0x00000000;
                sub_33618 (var96, var252);
                var255 = ((int *) var4)[652];
                var256 = ((int *) var255)[0];
                var257 = ((int *) var256)[45];
                var260 var261 = (*var257) (var255, var96, ((var14 | var15) | 0x00000005));
                sub_335E8 (var96);
                var264 = ((int *) var4)[893];

              label153:
                goto label154;
              }
              else
              {
                var96 = sp + 0x00000130;
                if (var95 != 0x00000028)
                {

                label152:
                  var97 = ((int *) var4)[893];
                  goto label153;
                }
                else
                {
                  var218 = LWL (0x0003954C);
                  var219 = LWR (0x0003954C, var218, 0x00000000);
                  var220 = LWL (0x0003954C);
                  var221 = LWR (0x0003954C, var220, 0x00000004);
                  var222 = LWL (0x0003954C, var95, 0x0000000B);
                  var223 = LWR (0x0003954C, var222, 0x00000008);
                  var224 = LWL (0x0003954C);
                  var225 = LWR (0x0003954C, var224, 0x0000000C);
                  SWL (sp, var219, 0x00000053);
                  SWR (sp, var219, 0x00000050);
                  SWL (sp, var221, 0x00000057);
                  SWR (sp, var221, 0x00000054);
                  SWL (sp, var223, 0x0000005B);
                  SWR (sp, var223, 0x00000058);
                  SWL (sp, var225, 0x0000005F);
                  SWR (sp, var225, 0x0000005C);
                  var226 = *((char *) 0x0003955C);
                  var227 = *((char *) 0x0003955D);
                  var228 = *((char *) 0x0003955E);
                  ((char *) sp)[96] = var226;
                  ((char *) sp)[97] = var227;
                  ((char *) sp)[98] = var228;
                  var229 = sp + 0x00000050;
                  var230 = 0x00000000;
                  var231 = sp + 0x00000070;
                  while (1) {
                    var232 = ((unsigned char *) (var229 + var230))[0];
                    var230 = var230 + 0x00000001;
                    ((char *) (var231 + var230))[0] = (!var232);
                    if (((var230 < 0x00000013)) != 0x00000000)
                      continue;
                    break;
                  }
                  var233 = sp + 0x000000B0;
                  var236 = scePaf_AF8BAECD (var233, 0x00000080, var231);
                  var237 = sp + 0x00000030;
                  ((int *) sp)[12] = 0x00000000;
                  ((int *) sp)[13] = 0x00000000;
                  sub_33618 (var237, var233);
                  var240 = ((int *) var4)[652];
                  var241 = ((int *) var240)[0];
                  var242 = ((int *) var241)[45];
                  var245 var246 = (*var242) (var240, var237, ((var14 | var15) | 0x00000004));
                  var110 = var237;
                }
              }
            }
            else
            {
              var96 = sp + 0x00000130;
              if (!(var95 == 0x00000017))
                goto label152;
              var202 = sp + 0x00000130;
              sub_2129C (var202, var4, 0x0000000B, (var4 + 0x00000A54));
              var205 = ((int *) sp)[76];
              var206 = sp + 0x00000030;
              ((int *) sp)[12] = 0x00000000;
              ((int *) sp)[13] = 0x00000000;
              sub_33618 (var206, var205);
              var209 = ((int *) var4)[652];
              var210 = ((int *) var209)[0];
              var211 = ((int *) var210)[45];
              var214 var215 = (*var211) (var209, var206, ((var14 | var15) | 0x00000004));
              sub_335E8 (var206);
              var110 = var202;
            }
          }
          sub_335E8 (var110);
          var113 = ((unsigned char *) var11)[4];
          if (var113 == 0x00000003)
          {
            var145 = ((int *) var4)[893];
            var148 = scePaf_970DC20D (var145, "msgshare_info_space");
            var149 = sp + 0x00000130;
            ((int *) sp)[76] = 0x00000000;
            ((int *) sp)[77] = 0x00000000;
            sub_33618 (var149, var148);
            var152 = ((unsigned char *) var4)[2640];
            if (var152 == 0x00000000)
            {
              var188 = scePaf_937DE11C (0x00039590);
              sub_32558 (var149, 0x00039590, var188);
              var191 = ((int *) var4)[893];
              var194 = scePaf_970DC20D (var191, "msgshare_info_none");
              var197 = scePaf_937DE11C (var194);
              sub_32558 (var149, var194, var197);
              var166 = scePaf_937DE11C (0x000395AC);
              var167 = var149;
              var168 = 0x000395AC;
            }
            else
            {
              var155 = sub_20AE8 (var4);
              var156 = sp + 0x00000140;
              sceVshCommonUtil_AED013BF (var156, 0x00000008, var155);
              var161 = scePaf_937DE11C (0x00039590);
              sub_32558 (var149, 0x00039590, var161);
              var166 = scePaf_937DE11C (var156);
              var167 = var149;
              var168 = var156;
            }
            sub_32558 (var167, var168, var166);
            var171 = ((int *) sp)[76];
            var172 = sp + 0x00000030;
            ((int *) sp)[12] = 0x00000000;
            ((int *) sp)[13] = 0x00000000;
            sub_33618 (var172, var171);
            var175 = ((int *) var4)[652];
            var176 = ((int *) var175)[0];
            var177 = ((int *) var176)[45];
            var180 var181 = (*var177) (var175, var172, ((var14 | var15) | 0x00000005));
            sub_335E8 (var172);
            sub_335E8 (var149);
            var114 = ((int *) var11)[0];
          }
          else
          {
            var114 = ((int *) var11)[0];
          }
          var115 = var2;
          if (var114 == 0x0000001C)
          {
            sub_1ECE0 (var4, var115, var1);
            var116 = var4;
          }
          else
          {
            var116 = var4;
          }
          var117 = 0x00000001;
          while (1) {
            var118 = ((int *) var11)[1];
            var119 = ((int *) var116)[64];
            var117 = var117 + 0xFFFFFFFF;
            if (var118 == var119)
            {
              var137 = ((int *) var4)[883];
              var138 = ((int *) var137)[7];
              __asm__ ("lwc1       $fpr12, 264($s0);");
              var141 var142 = (*var138) (var118, var115);
            }
            var116 = var116 + 0x00000004;
            if (var117 >= 0)
              continue;
            break;
          }
          var120 = ((int *) sp)[8];
          ra = ((int *) sp)[97];
          if (!(var120 == 0x00000000))
          {
            var121 = ((int *) var120)[1];
            var122 = var121 + 0xFFFFFFFF;
            ((int *) var120)[1] = var122;
            if (!(var122 <= 0))
              goto label223;
            var131 = ((int *) var120)[0];
            var132 = ((int *) var131)[1];
            var135 var136 = (*var132) (var120, var115);
            ra = ((int *) sp)[97];
          }
        }
        else
        goto label16;
        goto label224;
      }
    }
  }
  var123 = ((int *) sp)[95];
  var124 = ((int *) sp)[94];
  var125 = ((int *) sp)[93];
  var126 = ((int *) sp)[92];
  var127 = ((int *) sp)[91];
  var128 = ((int *) sp)[90];
  var129 = ((int *) sp)[89];
  var130 = ((int *) sp)[88];
  sp = sp + 0x00000190;
  return;
}

/**
 * Subroutine at address 0x0001E78C
 */
void sub_1E78C (int arg1)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[33] = s5;
  ((int *) sp)[37] = ra;
  ((int *) sp)[36] = fp;
  ((int *) sp)[35] = s7;
  ((int *) sp)[34] = s6;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  var1 = ((int *) arg1)[882];
  var2 = ((int *) var1)[33];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  ra = ((int *) sp)[37];
  if (var6 == 0x00000002)
  {
    var17 = ((int *) var3)[893];
    var20 = scePaf_970DC20D (var17, "msgshare_info_space");
    var21 = sp;
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    sub_33618 (var21, var20);
    var26 = sub_20AE8 (var3);
    var27 = sp + 0x00000020;
    sceVshCommonUtil_AED013BF (var27, 0x00000008, var26);
    var30 = ((unsigned char *) var3)[2640];
    if (var30 == 0x00000000)
    {
      var109 = scePaf_937DE11C (0x00039590);
      var110 = sp;
      sub_32558 (var110, 0x00039590, var109);
      var113 = ((int *) var3)[893];
      var116 = scePaf_970DC20D (var113, "msgshare_info_none");
      var119 = scePaf_937DE11C (var116);
      var120 = sp;
      sub_32558 (var120, var116, var119);
      var40 = scePaf_937DE11C (0x000395AC);
      var41 = sp;
      var42 = 0x000395AC;
    }
    else
    {
      var33 = scePaf_937DE11C (0x00039590);
      var34 = sp;
      sub_32558 (var34, 0x00039590, var33);
      var37 = sp + 0x00000020;
      var40 = scePaf_937DE11C (var37);
      var41 = sp;
      var42 = sp + 0x00000020;
    }
    sub_32558 (var41, var42, var40);
    ((int *) sp)[12] = 0x00000000;
    var45 = 0x00000001;
    var46 = var3 + 0x0000000C;
    while (1) {
      var47 = ((int *) var46)[894];
      var48 = 0x00000000;
      var49 = ((int *) var47)[1];
      ((int *) sp)[16] = var47;
      ((int *) sp)[12] = var49;
      if (!(var49 == var47))
      {
        var50 = sp + 0x00000050;
        while (1) {
          var51 = ((int *) sp)[12];
          var52 = ((int *) var51)[2];
          var53 = ((int *) var52)[0];
          if (var53 == 0x0000000D)
          {
            var54 = ((int *) sp)[0];

          label42:

          label47:
            ((int *) sp)[20] = 0x00000000;
            ((int *) sp)[21] = 0x00000000;
            sub_33618 (var50, var54);
            var98 = ((int *) var3)[652];
            var99 = ((int *) var98)[0];
            var100 = ((int *) var99)[45];
            var103 var104 = (*var100) (var98, var50, (((var45 << 0x00000018) | (var48 << 0x00000010)) | 0x00000005));
            sub_335E8 (var50);
            var55 = ((int *) sp)[12];
          }
          else
          {
            var54 = ((int *) sp)[0];
            if (var53 == 0x0000000F)
              goto label42;
            if (var53 == 0x00000012)
            {
              goto label47;
            }
            else
            {
              if (var53 == 0x00000016)
              {
                goto label47;
              }
              else
              {
                var55 = ((int *) sp)[12];
              }
            }
          }
          var48 = var48 + 0x00000001;
          ((int *) sp)[24] = var55;
          var56 = ((int *) var55)[1];
          ((int *) sp)[12] = var56;
          var57 = ((int *) var46)[894];
          ((int *) sp)[16] = var57;
          if (var56 != var57)
            continue;
          break;
        }
      }
      var45 = var45 + 0x00000001;
      var46 = var46 + 0x0000000C;
      if (((var45 < 0x00000008)) != 0x00000000)
        continue;
      break;
    }
    var58 = ((int *) var3)[893];
    var61 = scePaf_D27A723F (var58, "info_list");
    var62 = var61;
    if (!(var61 == 0x00000000))
    {
      var63 = ((int *) var3)[49];
      var64 = sp + 0x00000050;
      if (var63 == 0x00000002)
      {
        var68 = sp + 0x00000020;
        ((int *) sp)[20] = 0x00000000;
        ((int *) sp)[21] = 0x00000000;
        sub_33618 (var64, var68);
        var71 = ((int *) var62)[0];
        var72 = ((int *) var71)[45];
        var75 var76 = (*var72) (var62, var64, 0x000100C9);
        sub_335E8 (var64);
        var81 = sub_20A8C (var3);
        var82 = sp + 0x00000020;
        sceVshCommonUtil_AED013BF (var82, 0x00000008, var81);
        var85 = sp + 0x00000020;
        ((int *) sp)[20] = 0x00000000;
        ((int *) sp)[21] = 0x00000000;
        sub_33618 (var64, var85);
        var88 = ((int *) var62)[0];
        var89 = ((int *) var88)[45];
        var92 var93 = (*var89) (var62, var64, 0x000000C9);
        sub_335E8 (var64);
      }
    }
    var65 = sp;
    sub_335E8 (var65);
    ra = ((int *) sp)[37];
  }
  var8 = ((int *) sp)[36];
  var9 = ((int *) sp)[35];
  var10 = ((int *) sp)[34];
  var11 = ((int *) sp)[33];
  var12 = ((int *) sp)[32];
  var13 = ((int *) sp)[31];
  var14 = ((int *) sp)[30];
  var15 = ((int *) sp)[29];
  var16 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0001EA98
 */
int sub_1EA98 ()
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[56] = ra;
  ((int *) sp)[55] = s3;
  var1 = 0x00000004;
  ((int *) sp)[54] = s2;
  var2 = sp;
  ((int *) sp)[53] = s1;
  ((int *) sp)[52] = s0;
  while (1) {
    var1 = var1 + 0xFFFFFFFF;
    ((int *) var2)[0] = 0x00000000;
    ((int *) var2)[1] = 0x00000000;
    ((int *) var2)[3] = 0x00000000;
    ((int *) var2)[4] = 0x00000000;
    ((int *) var2)[6] = 0x00000000;
    ((int *) var2)[7] = 0x00000000;
    var2 = var2 + 0x00000024;
    if (var1 != 0xFFFFFFFF)
      continue;
    break;
  }
  var3 = sp;
  var6 = vsh_72193F87 (var3);
  var7 = 0x00000000;
  var8 = sp;
  if (var6 < 0)
  {
    vsh_E5463CE5 (0x00000002);
    var39 = sp;
    var40 = sp + 0x000000B4;
    while (1) {
      var18 = 0xFFFFFC13;
      if (var39 == var40)
        break;
      var40 = var40 + 0xFFFFFFDC;
      sub_317D8 ((var40 + 0x00000018));
      sub_317D8 ((var40 + 0x0000000C));
      sub_317D8 (var40);
      continue;
    }
  }
  else
  {
    var9 = ((int *) var8)[0];
    while (1) {
      var10 = *((char *) 0x000395EC);
      var11 = ((char *) var9)[0];
      var8 = var8 + 0x00000024;
      var12 = 0x00000000;
      if (var11 == var10)
      {
        var36 = scePaf_E3D530AE (var9, "release");
        var12 = (var36 < 0x00000001);
      }
      if (var12 != 0x00000000)
        break;
      var7 = var7 + 0x00000001;
      if (((var7 < 0x00000005)) != 0x00000000)
      {
        var9 = ((int *) var8)[0];
        continue;
      }
      else
      {
        var13 = 0xFFFFFC13;
        goto label32;
      }
      goto label34;
    }
    var13 = 0xFFFFFC13;
    if (((var7 < 0x00000005)) == 0x00000000)
    {

    label32:
      vsh_E5463CE5 (0x00000002);
    }
    else
    {
      var29 = sp + (((var7 << 0x00000003) + var7) << 0x00000002);
      var30 = ((int *) var29)[3];
      var33 = vsh_4F777346 (var30);
      var13 = var33;
      if (!(var33 >= 0))
      {
        goto label32;
      }
    }

  label34:
    var16 = sp;
    var17 = sp + 0x000000B4;
    while (1) {
      var18 = var13;
      if (var16 == var17)
        break;
      var17 = var17 + 0xFFFFFFDC;
      sub_317D8 ((var17 + 0x00000018));
      sub_317D8 ((var17 + 0x0000000C));
      sub_317D8 (var17);
      continue;
    }
  }
  ra = ((int *) sp)[56];
  var25 = ((int *) sp)[55];
  var26 = ((int *) sp)[54];
  var27 = ((int *) sp)[53];
  var28 = ((int *) sp)[52];
  sp = sp + 0x000000F0;
  return var18;
}

/**
 * Subroutine at address 0x0001EC0C
 */
void sub_1EC0C (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = arg1 + 0x000009A4;
  ((int *) sp)[8] = s0;
  var2 = arg1 + 0x00000A24;
  ((int *) sp)[10] = ra;
  var3 = sp;
  sceVshCommonUtil_D87E8E2D (var3, "/CONFIG/PREMO");
  scePaf_6439FDBC (var2, 0x00000000, 0x00000006);
  var8 = sp;
  var11 = sceVshCommonUtil_5750B4DE (var8, "ps3_mac", var2, 0x00000006);
  if (var11 != 0x00000000)
  {
    scePaf_6439FDBC (var2, 0x00000000, 0x00000006);
  }
  else
  {
  }
  scePaf_6439FDBC (var1, 0x00000000, 0x00000080);
  var14 = sp;
  var17 = sceVshCommonUtil_AFFAEAAD (var14, "ps3_name", var1, 0x00000080);
  if (var17 != 0x00000000)
  {
    scePaf_6439FDBC (var1, 0x00000000, 0x00000080);
  }
  var18 = sp;
  sceVshCommonUtil_625A9A5D (var18);
  ra = ((int *) sp)[10];
  var21 = ((int *) sp)[9];
  var22 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0001ECE0
 */
void sub_1ECE0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFE70;
  ((int *) sp)[97] = s5;
  ((int *) sp)[95] = s3;
  var1 = arg2;
  ((int *) sp)[94] = s2;
  var2 = arg3;
  ((int *) sp)[93] = s1;
  var3 = arg1;
  ((int *) sp)[98] = ra;
  ((int *) sp)[96] = s4;
  ((int *) sp)[92] = s0;
  var4 = ((int *) arg1)[652];
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if (!(var4 == 0x00000000))
  {
    if ((arg3 & arg2) >= 0)
    {
    }
    else
    {
      ((int *) sp)[8] = 0x00000000;
      var1 = 0x00000006;
      var2 = 0x00000000;
      var5 = ((int *) arg1)[912];
      var6 = ((int *) var5)[1];
      ((int *) sp)[12] = var5;
      ((int *) sp)[8] = var6;
      if (var6 == var5)
      {

      label9:
      }
      else
      {
        var7 = ((int *) arg1)[912];
        while (1) {
          var8 = ((int *) sp)[8];
          var9 = ((int *) var8)[2];
          var10 = ((int *) var9)[0];
          if (var10 == 0x0000001C)
            break;
          ((int *) sp)[16] = var8;
          var2 = var2 + 0x00000001;
          var11 = ((int *) var8)[1];
          ((int *) sp)[12] = var7;
          ((int *) sp)[8] = var11;
          if (var11 != var7)
            continue;
          goto label9;
        }
      }
    }
    var13 = 0x00000000;
    var14 = var3 + 0x00000A24;
    var15 = ((char *) var14)[0];
    while (1) {
      var14 = var14 + 0x00000001;
      if (var15 != 0x00000000)
        break;
      var13 = var13 + 0x00000001;
      if (((var13 < 0x00000006)) != 0x00000000)
      {
        var15 = ((char *) var14)[0];
        continue;
      }
      else
      {
        goto label18;
      }
      goto label19;
    }
    if (((var13 < 0x00000006)) != 0x00000000)
    {
      var65 = ((int *) var3)[893];
    }
    else
    {

    label18:
      var16 = ((int *) var3)[893];
    }

  label19:
    var19 = scePaf_970DC20D (var16, "msg_connected_device");
    var20 = sp;
    sub_33618 (var20, var19);
    var25 = scePaf_937DE11C (0x00039590);
    var26 = sp;
    sub_32558 (var26, 0x00039590, var25);
    if (var12 == 0x00000000)
    {
      var61 = ((int *) var3)[893];
      var64 = scePaf_970DC20D (var61, "msgshare_info_none");
      var29 = var64;
    }
    else
    {
      var29 = sp + 0x00000050;
      var32 = scePaf_AF8BAECD (var29, 0x00000102, (var3 + 0x000009A4));
    }
    var35 = scePaf_937DE11C (var29);
    var36 = sp;
    sub_32558 (var36, var29, var35);
    var39 = ((int *) sp)[0];
    var40 = sp + 0x00000160;
    ((int *) sp)[88] = 0x00000000;
    ((int *) sp)[89] = 0x00000000;
    sub_33618 (var40, var39);
    var43 = ((int *) var3)[652];
    var44 = ((int *) var43)[0];
    var45 = ((int *) var44)[45];
    var48 var49 = (*var45) (var43, var40, (((var1 << 0x00000018) | (var2 << 0x00000010)) | 0x00000005));
    sub_335E8 (var40);
  }
  var52 = sp;
  sub_335E8 (var52);
  ra = ((int *) sp)[98];
  var55 = ((int *) sp)[97];
  var56 = ((int *) sp)[96];
  var57 = ((int *) sp)[95];
  var58 = ((int *) sp)[94];
  var59 = ((int *) sp)[93];
  var60 = ((int *) sp)[92];
  sp = sp + 0x00000190;
  return;
}

/**
 * Subroutine at address 0x0001EEBC
 */
void sub_1EEBC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg1)[882];
  var2 = ((int *) var1)[92];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var8 = var3;
  var9 = 0x00046BDC;
  var10 = 0x00000024;
  if (!(var6 == 0x00000001))
  {
    var8 = var3;
    var9 = 0x00046B50;
    var10 = 0x00000025;
  }
  sub_1C5D4 (var8, 0x00000007, var10, var9);
  ra = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001EF20
 */
void sub_1EF20 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = arg3;
  ((int *) sp)[0] = s0;
  var3 = arg4;
  ((int *) sp)[4] = ra;
  if (arg3 < 0)
  {
    var24 = ((int *) arg1)[652];
    var2 = ((int *) var24)[206];
  }
  if (var3 < 0)
  {
    var20 = ((int *) var1)[652];
    var23 = scePaf_BE7032D1 (var20, 0xFFFFFFFF);
    var3 = var23;
  }
  var6 = sub_1B68C (var1, var2, var3);
  ra = ((int *) sp)[4];
  if (!(var6 == 0x00000000))
  {
    var7 = ((int *) var6)[0];
    if (var7 == 0x00000024)
    {
      var12 = 0x00000004;

    label17:
      var13 = ((int *) var1)[652];
      var14 = ((int *) var13)[0];
      var15 = ((int *) var14)[31];
      var18 var19 = (*var15) (var13, (((var2 << 0x00000018) | (var3 << 0x00000010)) | var12), 0x0000003F, (arg2 & 0x000000FF));
      ra = ((int *) sp)[4];
    }
    else
    {
      if (var7 == 0x00000025)
      {
        var12 = 0x00000005;
        goto label17;
      }
    }
  }
  var8 = ((int *) sp)[3];
  var9 = ((int *) sp)[2];
  var10 = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001EFF0
 */
int sub_1EFF0 (int arg1, int arg2, int arg3)
{
  var1 = (arg3 < 0x00000002);
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var2 = arg1;
  ((int *) sp)[1] = s1;
  var3 = arg3;
  ((int *) sp)[0] = s0;
  var4 = arg2;
  ((int *) sp)[3] = ra;
  if (((((arg2 ^ 0x00000006) < 0x00000001)) & var1) != 0x00000000)
  {
    var45 = sub_21608 (arg1, 0x00000001);
    var21 = var2;
    var22 = 0x00000001;
    if (var45 != 0x00000000)
    {

    label33:
      var25 = sub_21684 (var21, var22);
      if (var25 != 0x00000000)
      {
        var6 = 0x00000000;
      }
      else
      {
        ((int *) var2)[53] = var3;
        ((int *) var2)[52] = var4;
        sub_1559C ();
        var6 = 0xFFFFF82B;
      }
    }
    else
    {
      var46 = ((int *) var2)[724];
      var42 = sub_1C918 (var2, var46);
      var32 = var2;

    label19:
      var33 = 0x00000005;
      if (!(var42 != 0x00000000))
      {
        var32 = var2;
        var33 = 0x00000009;
      }

    label30:
      sub_1F2D8 (var32, var33);
      var6 = 0xFFFFF82A;
    }
  }
  else
  {
    if (arg2 == 0x00000007)
    {
      if ((((arg3 + 0xFFFFFFFD) < 0x00000002)) == 0x00000000)
      {
        var5 = var4 ^ 0x00000009;

      label22:
        if ((((var5 < 0x00000001)) & var1) != 0x00000000)
        {
          var20 = sub_21608 (var2, 0x00000005);
          var21 = var2;
          var22 = 0x00000005;
          if (!(var20 == 0x00000000))
            goto label33;
          var28 = ((int *) var2)[779];
          var31 = sub_1C918 (var2, var28);
          var32 = var2;
          var33 = 0x00000006;
          if (!(var31 != 0x00000000))
          {
            var32 = var2;
            var33 = 0x0000000A;
          }
          goto label30;
        }
        else
        {
          var6 = 0x00000000;
          if (((((var4 ^ 0x0000000F) < 0x00000001)) & (((var3 ^ 0x00000001) < 0x00000001))) != 0x00000000)
          {
            var12 = sub_1EA98 ();
            if (var12 < 0)
            {
              sub_1F2D8 (var2, 0x00000000);
              var6 = 0xFFFFEC77;
            }
            else
            {
              var13 = ((int *) var2)[833];
              if (((var12 < var13)) != 0x00000000)
              {
                var6 = 0x00000000;
              }
              else
              {
                sub_1F2D8 (var2, 0x0000000B);
                var6 = 0xFFFFF82E;
              }
            }
          }
        }
      }
      else
      {
        var38 = sub_21608 (arg1, 0x00000003);
        var21 = var2;
        var22 = 0x00000003;
        if (var38 != 0x00000000)
          goto label33;
        var39 = ((int *) var2)[724];
        var42 = sub_1C918 (var2, var39);
        var32 = var2;
        goto label19;
      }
    }
    else
    {
      var5 = var4 ^ 0x00000009;
      goto label22;
    }
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x0001F19C
 */
int sub_1F19C (int arg1, int arg2, int arg3)
{
  var1 = arg2;
  sp = sp + 0xFFFFFFF0;
  var2 = (((arg2 ^ 0x0000000B) < 0x00000001)) | (((var1 ^ 0x00000011) < 0x00000001));
  ((int *) sp)[0] = s0;
  var3 = (((var1 ^ 0x00000017) < 0x00000001)) | (((var1 ^ 0x00000019) < 0x00000001));
  var4 = arg1;
  ((int *) sp)[1] = ra;
  if (var2 != 0x00000000)
  {

  label10:
    var6 = ((int *) var4)[882];

  label11:
    var7 = ((int *) var6)[33];
    var10 var11 = (*var7) (var5, var2, arg3, var3, var1, arg6, arg7, arg8);
    if (var10 == 0x00000003)
    {
      sub_1F2D8 (var4, 0x0000000D);
      var12 = 0xFFFFF829;
    }
    else
    {
      var12 = 0x00000000;
    }
  }
  else
  {
    if (var3 != 0x00000000)
    {
      var6 = ((int *) var4)[882];
      goto label11;
    }
    else
    {
      var5 = (((var1 ^ 0x0000000F) < 0x00000001)) & (((arg3 ^ 0x00000006) < 0x00000001));
      if (var1 == 0x0000001B)
        goto label10;
      if (var5 != 0x00000000)
        goto label10;
      if (((((var1 ^ 0x00000008) < 0x00000001)) & (((arg3 ^ 0x00000005) < 0x00000001))) == 0x00000000)
      {
        var12 = 0x00000000;
      }
      else
      {
        goto label10;
      }
    }
  }
  ra = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var12;
}

/**
 * Subroutine at address 0x0001F268
 */
void sub_1F268 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = sub_1B644 (arg1);
  var5 = var4;
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) var5)[1];
    var7 = var6 & 0x000000FF;
    if (var7 == 0x00000002)
    {
      var10 = ((int *) var1)[662];
      ((int *) var1)[54] = var10;

    label11:
      var6 = ((int *) var5)[1];

    label12:
    }
    else
    {
      if (((var7 < 0x00000002)) != 0x00000000)
        goto label12;
      if (((var7 < 0x00000005)) == 0x00000000)
      {
      }
      else
      {
        var8 = ((int *) var1)[654];
        ((int *) var1)[55] = var8;
        goto label11;
      }
    }
  }
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F2D8
 */
void sub_1F2D8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[34] = s2;
  var1 = arg2;
  ((int *) sp)[33] = s1;
  ((int *) sp)[40] = ra;
  ((int *) sp)[39] = s7;
  ((int *) sp)[38] = s6;
  ((int *) sp)[37] = s5;
  ((int *) sp)[36] = s4;
  ((int *) sp)[35] = s3;
  ((int *) sp)[32] = s0;
  var2 = ((unsigned char *) arg1)[273];
  var3 = arg1;
  if (var2 != 0x00000000)
  {

  label116:
    ra = ((int *) sp)[40];
  }
  else
  {
    var4 = ((unsigned char *) arg1)[272];
    ra = ((int *) sp)[40];
    if (!(var4 == 0x00000000))
    {
      var5 = ((unsigned char *) arg1)[352];
      if (!(var5 == 0x00000000))
        goto label116;
      var16 = sub_2FA74 ();
      ra = ((int *) sp)[40];
      if (!(var16 != 0x00000000))
      {
        var17 = ((int *) var3)[893];
        var20 = scePaf_11FA6015 (var17, "page_info");
        ra = ((int *) sp)[40];
        if (!(var20 != 0x00000000))
        {
          var21 = ((int *) var3)[48];
          ((char *) var3)[273] = 0x00000001;
          ((int *) var3)[48] = (((var21 & 0xFFFFFFCF) | (0x00000000 & 0x00000003)) | 0x00000004);
          sub_22C20 (var3);
          var24 = ((int *) var3)[47];
          ((int *) var3)[887] = 0x0001F804;
          if ((var24 & 0x00000400) == 0x00000000)
          {
            var130 = sub_21E8C (var3, 0x00000000);
            ((int *) var3)[887] = 0x0001F858;
          }
          var25 = sp + 0x00000010;
          ((int *) sp)[4] = 0x00000000;
          var26 = 0x00000002;
          var27 = 0x00000000;
          ((int *) sp)[5] = 0x00000000;
          sub_318F0 (var25, 0x000394B0);
          ((int *) sp)[13] = 0x00000000;
          ((int *) sp)[12] = 0x00000000;
          ((short *) sp)[40] = 0x00000000;
          ((int *) var3)[57] = var1;
          if (((var1 < 0x00000010)) == 0x00000000)
          {

          label58:
            var35 = ((unsigned short *) sp)[40];
          }
          else
          {
            var30 = ((int *) ((var1 << 0x00000002) + 0x000430CC))[0];
            switch () {
            case 0:
              var31 = var25;
              var32 = "msgshare_error_content_corrupted_game";

            label56:
              sub_318F0 (var31, var32);
              goto label58;
            case 1:
              var31 = var25;
              var32 = "msgshare_error_notload_disc";
              goto label56;
            case 2:
            case 12:
              var31 = var25;
              var32 = "msgshare_error_invalid_disc";
              goto label56;
            case 3:
              var31 = var25;
              var32 = "msgshare_error_wrong_region_disc_game";
              goto label56;
            case 4:
              sub_318F0 (var25, "msgtop_updateprompt_game");
              var108 = ((int *) var3)[669];

            label49:
              var109 = sp + 0x00000050;
              vsh_2880DDA6 (var109, 0x00000005, var108);
              var26 = 0x00000000;
              var27 = 0x00000001;
              ((int *) var3)[887] = 0x0001F8A8;
              goto label58;
            case 5:
              sub_318F0 (var25, "msgtop_updateprompt_musicvideo");
              var108 = ((int *) var3)[724];
              goto label49;
            case 6:
              sub_318F0 (var25, "msgtop_updateprompt_musicvideo");
              var108 = ((int *) var3)[779];
              goto label49;
            case 7:
              var31 = var25;
              var32 = "msgtop_updateprompt";
              goto label56;
            case 8:
              sub_318F0 (var25, "msgshare_updateprompt_game_readmanual");
              var118 = ((int *) var3)[669];

            label36:
              var119 = sp + 0x00000050;
              vsh_2880DDA6 (var119, 0x00000005, var118);
              var35 = ((unsigned short *) sp)[40];
              goto label59;
            case 9:
              sub_318F0 (var25, "msgshare_updateprompt_musicvideo_readmanual");
              var118 = ((int *) var3)[724];
              goto label36;
            case 10:
              sub_318F0 (var25, "msgshare_updateprompt_musicvideo_readmanual");
              var118 = ((int *) var3)[779];
              goto label36;
            case 11:
              sub_318F0 (var25, "msgshare_updateprompt_updateunnecessary");
              ((short *) sp)[40] = 0x0000000A;
              goto label58;
            case 13:
              var31 = var25;
              var32 = "msgtop_error_ms_wrong_format";
              goto label56;
            case 14:
              var31 = var25;
              var32 = "msg_error_display_output";
              goto label56;
            case 15:
              var31 = var25;
              var32 = "msg_error_game_display_output";
              goto label56;
            }
          }

        label59:
          if (var35 == 0x00000000)
          {
            var99 = ((int *) var3)[893];
            var100 = ((int *) sp)[4];
            var45 = sp + 0x00000030;
            var44 = sp + 0x00000070;
            var103 = scePaf_970DC20D (var99, var100);
            sub_33618 (var45, var103);
          }
          else
          {
            var36 = sp + 0x00000060;
            ((short *) sp)[48] = 0x00000000;
            var39 = sub_1EA98 ();
            vsh_2880DDA6 (var36, 0x00000005, var39);
            var42 = ((int *) var3)[893];
            var43 = ((int *) sp)[4];
            var44 = sp + 0x00000070;
            var45 = sp + 0x00000030;
            var48 = scePaf_970DC20D (var42, var43);
            var49 = sp + 0x00000050;
            ((int *) sp)[0] = 0x00000000;
            ((int *) sp)[1] = 0x00000000;
            ((int *) sp)[2] = 0x00000000;
            scePaf_B580EF60 (var44, var48, var36, var49, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
            sub_33668 (var45, var44);
            sub_335E8 (var44);
          }
          var56 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          sceVshCommonGui_FA85A7E1 ("topmenu_plugin");
          var59 = ((int *) var3)[883];
          var60 = ((int *) var59)[14];
          var63 var64 = (*var60) ();
          var65 = ((int *) sp)[12];
          ((int *) sp)[28] = 0x00000000;
          ((int *) sp)[29] = 0x00000000;
          sub_33618 (var44, var65);
          var70 = sceVshCommonGui_B3B020CB (var63, var44, var26, 0x0001F8CC, 0x00000007, 0x00000000, var3);
          ((int *) var3)[885] = var70;
          sub_335E8 (var44);
          if (var1 == 0x0000000D)
          {
            var98 = ((int *) var3)[885];
            ((int *) var3)[885] = 0x00000000;
            ((int *) var3)[886] = var98;
          }
          var73 = ((int *) var3)[651];
          var76 = scePaf_970DC20D (var73, "msgsystem_back");
          sceVshCommonGui_25489D52 (var44, var76);
          sub_335E8 (var44);
          sceVshCommonGui_A745DB12 (0x00000001);
          if (var27 != 0x00000000)
          {
            var88 = ((int *) var3)[651];
            var91 = scePaf_970DC20D (var88, "msgsystem_enter");
            sceVshCommonGui_5AFF4B9F (var44, var91);
            sub_335E8 (var44);
            sceVshCommonGui_B5EB251D (0x00000001);
          }
          sub_335E8 (var45);
          var85 = sp + 0x00000010;
          sub_317D8 (var85);
          ra = ((int *) sp)[40];
        }
      }
    }
  }
  var6 = ((int *) sp)[39];
  var7 = ((int *) sp)[38];
  var8 = ((int *) sp)[37];
  var9 = ((int *) sp)[36];
  var10 = ((int *) sp)[35];
  var11 = ((int *) sp)[34];
  var12 = ((int *) sp)[33];
  var13 = ((int *) sp)[32];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x0001F744
 */
void sub_1F744 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((unsigned char *) arg1)[273];
  if (var1 != 0x00000000)
  {
    var4 = scePaf_A78805B0 ("auth_plugin");
    if (var4 == 0x00000000)
    {

    label13:
    }
    else
    {
      var7 = scePaf_4E87FDFC (var4, 0x00000001);
      if (var7 == 0x00000000)
      {
      }
      else
      {
        var8 = ((int *) var7)[4];
        var11 var12 = (*var8) ();
      }
    }
  }
  else
  goto label13;
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F7A4
 */
int sub_1F7A4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = 0x00000000;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) arg1)[273];
  var3 = arg1;
  if (!(var2 == 0x00000000))
  {
    if (!(arg2 == 0x00000000))
    {
      sceVshCommonGui_565E9AE2 (arg2);
      var6 = ((int *) var3)[887];
      if (var6 != 0x00000000)
      {
        var10 var11 = (*var6) (var3);
        var1 = 0x00000001;
      }
      else
      {
        var1 = 0x00000001;
      }
    }
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x0001F804
 */
void sub_1F804 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = ((int *) arg1)[48];
  ((char *) arg1)[273] = 0x00000000;
  ((int *) arg1)[48] = (var2 | 0x00000030);
  ((int *) arg1)[884] = 0x00000000;
  ((int *) arg1)[885] = 0x00000000;
  ((int *) arg1)[886] = 0x00000000;
  sub_22AC4 (arg1);
  sub_22CF0 (var1);
  ((int *) var1)[887] = 0x00000000;
  sceVshCommonGui_A745DB12 (0x00000000);
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F858
 */
void sub_1F858 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_1F804 (arg1);
  var4 = ((int *) var1)[47];
  var5 = var4 | 0x00000004;
  ((int *) var1)[47] = var5;
  if ((var5 & 0x00000400) == 0x00000000)
  {
    var9 = sub_21E8C (var1, 0x00000001);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F8A8
 */
void sub_1F8A8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_1F804 (arg1);
  sceVshCommonGui_B5EB251D (0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F8CC
 */
void sub_1F8CC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg2)[887];
  var3 = arg2;
  var6 var7 = (*var2) (arg2, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var8 = ((int *) var3)[48];
  __asm__ ("mtc1       $zr, $fpr12;");
  var9 = ((unsigned char *) var3)[357];
  __asm__ ("mov.s      $fpr13, $fpr12;");
  ((int *) var3)[48] = ((var8 & 0xFFFFFFCF) | (0x00000000 & 0x00000003));
  if (var9 != 0x00000000)
  {
    var22 = ((int *) var3)[652];
    scePaf_043C75D2 (var22);
  }
  else
  {
  }
  if (var1 == 0x00000000)
  {
    sub_12674 (0x0000000F, 0x00000001);
    ra = ((int *) sp)[2];
  }
  else
  {
    if (var1 <= 0)
    {

    label15:
      var10 = ((int *) var3)[57];
      if ((((var10 + 0xFFFFFFFC) < 0x00000003)) == 0x00000000)
      {
        var15 = ((int *) var3)[48];
        ((int *) var3)[48] = (var15 | 0x00000030);
        sub_22AC4 (var3);
        sub_22CF0 (var3);
        ra = ((int *) sp)[2];
      }
      else
      {

      label22:
        sub_1F2D8 (var3, 0x00000007);
        ra = ((int *) sp)[2];
      }
    }
    else
    {
      if (var1 == 0x00000001)
        goto label22;
      goto label15;
    }
  }
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F9A4
 */
int sub_1F9A4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  var2 = ((int *) arg1)[888];
  if (var2 != 0x00000000)
  {
    var5 = sub_22298 (var2, arg2);
    var1 = var5;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x0001F9DC
 */
void sub_1F9DC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[653];
  var2 = arg1;
  if (var1 == 0x00000000)
  {
    var9 = sub_21684 (arg1, arg2);
    var12 = scePaf_48BB05D5 (0x00000050);
    var13 = ((int *) var2)[893];
    var14 = var12;
    var17 = scePaf_D27A723F (var13, "page_content_info_bg");
    var18 = ((int *) var2)[893];
    var21 = scePaf_D27A723F (var18, "page_content_info_fg");
    vsh_7A71436C (var14, (!(var9) ? 0x00001000 : 0x00000100), var17, var21);
    ((int *) var2)[653] = var14;
  }
  ra = ((int *) sp)[4];
  var3 = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001FA7C
 */
void sub_1FA7C (int arg1)
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[34] = ra;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  var1 = arg1;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  var4 = sub_21720 (arg1);
  var5 = var4;
  sub_1F9DC (var1, var4);
  var8 = ((int *) var1)[653];
  if (var8 == 0x00000000)
  {
    var20 = var1;

  label22:
    var23 = sub_21684 (var20, var5);
    var24 = sp;
    if (var23 != 0x00000000)
    {
      var265 = sp + 0x00000010;
      sub_32348 (var24, 0x00000000);
      sub_32368 (var265, 0x00000000);
      var270 = ((int *) var1)[51];
      var271 = sp;
      var272 = 0x00000000;
      if (!((var270 & 0x00000001) != 0x00000000))
      {
        var273 = ((int *) var1)[888];
        var271 = sp;
        var272 = ((int *) var273)[3];
      }
      sub_3397C (var271, var272);
      var276 = ((int *) var1)[51];
      var277 = var265;
      var278 = 0x00000000;
      if (!((var276 & 0x00000002) != 0x00000000))
      {
        var279 = ((int *) var1)[888];
        var277 = var265;
        var278 = ((int *) var279)[4];
      }
      sub_339D8 (var277, var278);
      var282 = ((int *) sp)[0];
      if (var282 == 0x00000000)
      {
        var476 = ((int *) var1)[888];
        var40 = sp + 0x00000020;
        sub_32408 (var40, (var476 + 0x00000008));
        var286 = ((int *) var1)[51];
      }
      else
      {
        var283 = ((int *) var1)[893];
        var40 = sp + 0x00000020;
        scePaf_047C9996 (var40, var283, "tex_transparent");
        var286 = ((int *) var1)[51];
      }
      var287 = ((int *) var1)[653];
      var288 = sp;
      var291 = vsh_04A37A04 (var287, var288, (((var286 & 0x0000000A) < 0x00000001)));
      var292 = ((int *) var1)[653];
      vsh_5D12399C (var292, var265);
      if (var291 == 0xFFFFFC16)
      {
        var450 = ((int *) var1)[51];
        ((int *) var1)[51] = (var450 | 0x00000001);
        sub_21CD4 (var1, 0x00000004);
        var455 = scePaf_2338483F ();
        var456 = ((int *) var455)[38];
        var457 = sp + 0x00000060;
        var460 = sub_213B0 (var1, 0x00000002, var456, var457);
        if (var460 != 0x00000000)
        {
          var472 = sp + 0x00000060;
          var456 = 0xFFFFFFFF;
          var475 = sub_213B0 (var1, 0x00000002, 0xFFFFFFFF, var472);
          var461 = ((int *) sp)[24];
        }
        else
        {
          var461 = ((int *) sp)[24];
        }
        var462 = var1;
        if (((0x000F9FFF < (var461 + 0xFFFFFFFF))) != 0x00000000)
        {

        label67:
          sub_21CD4 (var462, 0x00000002);
          var466 = ((int *) var1)[888];
        }
        else
        {
          var465 = sub_21B88 (var462, 0x00000002, var456);
          if (var465 != 0x00000000)
          {
            var462 = var1;
            goto label67;
          }
          else
          {
            var466 = ((int *) var1)[888];
          }
        }
        var467 = ((int *) var466)[2];
        sub_32448 (var40, var467);
        var295 = ((int *) var1)[653];
      }
      else
      {
        var295 = ((int *) var1)[653];
      }
      vsh_DA00CA52 (var295, var40, 0x00000002);
      var298 = ((int *) var1)[653];
      var299 = ((int *) var1)[888];
      var109 = sp + 0x00000050;
      vsh_DA00CA52 (var298, var299, 0x00000000);
      var302 = ((int *) var1)[888];
      var303 = ((int *) var1)[653];
      vsh_DA00CA52 (var303, (var302 + 0x00000004), 0x00000001);
      var306 = ((int *) var1)[651];
      scePaf_047C9996 (var109, var306, "tex_3x3_focus");
      var309 = ((int *) var1)[653];
      vsh_DA00CA52 (var309, var109, 0x00000003);
      var312 = ((int *) sp)[20];
      var313 = var109;
      if (var312 == 0x00000000)
      {

      label90:
        var316 = ((int *) var1)[651];
      }
      else
      {
        var314 = ((int *) var312)[1];
        var315 = var314 + 0xFFFFFFFF;
        ((int *) var312)[1] = var315;
        if (!(var315 <= 0))
          goto label90;
        var443 = ((int *) var312)[0];
        var444 = ((int *) var443)[1];
        var447 var448 = (*var444) (var312);
        var449 = ((int *) var1)[651];
      }
      scePaf_047C9996 (var313, var316, "tex_3x3_shadow");
      var319 = ((int *) var1)[653];
      vsh_DA00CA52 (var319, var313, 0x00000005);
      var322 = ((int *) sp)[20];
      if (var322 == 0x00000000)
      {
        var325 = ((int *) var1)[888];
      }
      else
      {
        var323 = ((int *) var322)[1];
        var324 = var323 + 0xFFFFFFFF;
        ((int *) var322)[1] = var324;
        if (var324 <= 0)
        {
          var437 = ((int *) var322)[0];
          var438 = ((int *) var437)[1];
          var441 var442 = (*var438) (var322);
          var325 = ((int *) var1)[888];
        }
        else
        {
          var325 = ((int *) var1)[888];
        }
      }
      var326 = ((int *) var325)[1];
      if (var326 != 0x00000000)
      {

      label139:
        sub_32328 (var313, 0x00000000);
        var330 = ((int *) var1)[653];
        vsh_DA00CA52 (var330, var313, 0x00000006);
        var333 = ((int *) sp)[20];
        if (var333 == 0x00000000)
        {
          var336 = var313;
        }
        else
        {
          var334 = ((int *) var333)[1];
          var335 = var334 + 0xFFFFFFFF;
          ((int *) var333)[1] = var335;
          if (var335 <= 0)
          {
            var382 = ((int *) var333)[0];
            var383 = ((int *) var382)[1];
            var386 var387 = (*var383) (var333);
            var336 = var313;
          }
          else
          {
            var336 = var313;
          }
        }
        sub_32328 (var336, 0x00000000);
        var339 = ((int *) var1)[653];
        vsh_DA00CA52 (var339, var313, 0x00000007);
        var342 = ((int *) sp)[20];
        var343 = sp + 0x00000030;
        if (!(var342 == 0x00000000))
        {
          var344 = ((int *) var342)[1];
          var345 = var344 + 0xFFFFFFFF;
          ((int *) var342)[1] = var345;
          if (var345 <= 0)
          {
            var376 = ((int *) var342)[0];
            var377 = ((int *) var376)[1];
            var380 var381 = (*var377) (var342);
            var343 = sp + 0x00000030;
          }
          else
          {
            var343 = sp + 0x00000030;
          }
        }
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        sub_33618 (var343, 0x00000000);
        var348 = ((int *) var1)[653];
        sub_09AA4 (var348, var343, 0x00000008);
        sub_335E8 (var343);
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        sub_33618 (var343, 0x00000000);
        var355 = ((int *) var1)[653];
        sub_09AA4 (var355, var343, 0x00000009);
        var358 = var343;
      }
      else
      {
        var327 = ((int *) var325)[0];
        if (!(var327 == 0x00000000))
          goto label139;
        var388 = ((int *) var1)[651];
        scePaf_047C9996 (var313, var388, "tex_line");
        var391 = ((int *) var1)[653];
        vsh_DA00CA52 (var391, var313, 0x00000006);
        var394 = ((int *) sp)[20];
        if (var394 == 0x00000000)
        {
          var436 = ((int *) var1)[651];
        }
        else
        {
          var395 = ((int *) var394)[1];
          var396 = var395 + 0xFFFFFFFF;
          ((int *) var394)[1] = var396;
          if (var396 <= 0)
          {
            var429 = ((int *) var394)[0];
            var430 = ((int *) var429)[1];
            var433 var434 = (*var430) (var394);
            var435 = ((int *) var1)[651];
          }
          else
          {
            var397 = ((int *) var1)[651];
          }
        }
        scePaf_047C9996 (var313, var397, "tex_line_shadow");
        var400 = ((int *) var1)[653];
        vsh_DA00CA52 (var400, var313, 0x00000007);
        var403 = ((int *) sp)[20];
        var404 = sp + 0x00000030;
        if (!(var403 == 0x00000000))
        {
          var405 = ((int *) var403)[1];
          var406 = var405 + 0xFFFFFFFF;
          ((int *) var403)[1] = var406;
          if (var406 <= 0)
          {
            var423 = ((int *) var403)[0];
            var424 = ((int *) var423)[1];
            var427 var428 = (*var424) (var403);
            var404 = sp + 0x00000030;
          }
          else
          {
            var404 = sp + 0x00000030;
          }
        }
        sub_217D8 (var404, var1, var5);
        var409 = ((int *) var1)[653];
        sub_09AA4 (var409, var404, 0x00000008);
        sub_335E8 (var404);
        var414 = ((int *) var1)[893];
        var417 = scePaf_970DC20D (var414, "msgshare_umd");
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        sub_33618 (var404, var417);
        var420 = ((int *) var1)[653];
        sub_09AA4 (var420, var404, 0x00000009);
        var358 = var404;
      }
      sub_335E8 (var358);
      var361 = ((int *) sp)[8];
      if (var361 == 0x00000000)
      {
        var364 = ((int *) sp)[4];
      }
      else
      {
        var362 = ((int *) var361)[1];
        var363 = var362 + 0xFFFFFFFF;
        ((int *) var361)[1] = var363;
        if (var363 <= 0)
        {
          var370 = ((int *) var361)[0];
          var371 = ((int *) var370)[1];
          var374 var375 = (*var371) (var361);
          var364 = ((int *) sp)[4];
        }
        else
        {
          var364 = ((int *) sp)[4];
        }
      }
      if (var364 != 0x00000000)
      {
        scePaf_65FDC4C5 (var364);
        var365 = ((int *) sp)[0];
      }
      else
      {
        var365 = ((int *) sp)[0];
      }
      if (!(var365 == 0x00000000))
      {
        scePaf_65FDC4C5 (var365);
      }
    }
    else
    {
      sub_32348 (var24, 0x00000000);
      var27 = ((int *) var1)[653];
      var28 = sp;
      var31 = vsh_04A37A04 (var27, var28, 0x00000000);
      var32 = ((int *) sp)[0];
      if (var32 != 0x00000000)
      {
        scePaf_65FDC4C5 (var32);
        var33 = sp + 0x00000010;
      }
      else
      {
        var33 = sp + 0x00000010;
      }
      sub_32368 (var33, 0x00000000);
      var36 = ((int *) var1)[653];
      vsh_5D12399C (var36, var33);
      var39 = ((int *) sp)[4];
      if (var39 != 0x00000000)
      {
        scePaf_65FDC4C5 (var39);
        var40 = sp + 0x00000020;
      }
      else
      {
        var40 = sp + 0x00000020;
      }
      sub_32328 (var40, 0x00000000);
      var43 = ((int *) var1)[653];
      vsh_DA00CA52 (var43, var40, 0x00000000);
      var46 = ((int *) sp)[8];
      var47 = var40;
      if (var46 == 0x00000000)
      {

      label216:
        var50 = var47;
      }
      else
      {
        var48 = ((int *) var46)[1];
        var49 = var48 + 0xFFFFFFFF;
        ((int *) var46)[1] = var49;
        if (!(var49 <= 0))
          goto label216;
        var255 = ((int *) var46)[0];
        var256 = ((int *) var255)[1];
        var259 var260 = (*var256) (var46);
        var50 = var47;
      }
      sub_32328 (var50, 0x00000000);
      var53 = ((int *) var1)[653];
      vsh_DA00CA52 (var53, var47, 0x00000001);
      var56 = ((int *) sp)[8];
      if (var56 == 0x00000000)
      {
        var254 = ((int *) var1)[893];
      }
      else
      {
        var57 = ((int *) var56)[1];
        var58 = var57 + 0xFFFFFFFF;
        ((int *) var56)[1] = var58;
        if (var58 <= 0)
        {
          var247 = ((int *) var56)[0];
          var248 = ((int *) var247)[1];
          var251 var252 = (*var248) (var56);
          var253 = ((int *) var1)[893];
        }
        else
        {
          var59 = ((int *) var1)[893];
        }
      }
      scePaf_047C9996 (var47, var59, "tex_parental");
      var62 = ((int *) var1)[653];
      vsh_DA00CA52 (var62, var47, 0x00000002);
      var65 = ((int *) sp)[8];
      if (var65 == 0x00000000)
      {
        var246 = ((int *) var1)[893];
      }
      else
      {
        var66 = ((int *) var65)[1];
        var67 = var66 + 0xFFFFFFFF;
        ((int *) var65)[1] = var67;
        if (var67 <= 0)
        {
          var239 = ((int *) var65)[0];
          var240 = ((int *) var239)[1];
          var243 var244 = (*var240) (var65);
          var245 = ((int *) var1)[893];
        }
        else
        {
          var68 = ((int *) var1)[893];
        }
      }
      scePaf_047C9996 (var47, var68, "tex_fcs_parental");
      var71 = ((int *) var1)[653];
      vsh_DA00CA52 (var71, var47, 0x00000003);
      var74 = ((int *) sp)[8];
      if (var74 == 0x00000000)
      {
        var238 = ((int *) var1)[893];
      }
      else
      {
        var75 = ((int *) var74)[1];
        var76 = var75 + 0xFFFFFFFF;
        ((int *) var74)[1] = var76;
        if (var76 <= 0)
        {
          var231 = ((int *) var74)[0];
          var232 = ((int *) var231)[1];
          var235 var236 = (*var232) (var74);
          var237 = ((int *) var1)[893];
        }
        else
        {
          var77 = ((int *) var1)[893];
        }
      }
      scePaf_047C9996 (var47, var77, "tex_sdw_parental");
      var80 = ((int *) var1)[653];
      vsh_DA00CA52 (var80, var47, 0x00000005);
      var83 = ((int *) sp)[8];
      if (var83 == 0x00000000)
      {
        var230 = ((int *) var1)[651];
      }
      else
      {
        var84 = ((int *) var83)[1];
        var85 = var84 + 0xFFFFFFFF;
        ((int *) var83)[1] = var85;
        if (var85 <= 0)
        {
          var223 = ((int *) var83)[0];
          var224 = ((int *) var223)[1];
          var227 var228 = (*var224) (var83);
          var229 = ((int *) var1)[651];
        }
        else
        {
          var86 = ((int *) var1)[651];
        }
      }
      scePaf_047C9996 (var47, var86, "tex_line");
      var89 = ((int *) var1)[653];
      vsh_DA00CA52 (var89, var47, 0x00000006);
      var92 = ((int *) sp)[8];
      if (var92 == 0x00000000)
      {
        var222 = ((int *) var1)[651];
      }
      else
      {
        var93 = ((int *) var92)[1];
        var94 = var93 + 0xFFFFFFFF;
        ((int *) var92)[1] = var94;
        if (var94 <= 0)
        {
          var215 = ((int *) var92)[0];
          var216 = ((int *) var215)[1];
          var219 var220 = (*var216) (var92);
          var221 = ((int *) var1)[651];
        }
        else
        {
          var95 = ((int *) var1)[651];
        }
      }
      scePaf_047C9996 (var47, var95, "tex_line_shadow");
      var98 = ((int *) var1)[653];
      vsh_DA00CA52 (var98, var47, 0x00000007);
      var101 = ((int *) sp)[8];
      if (var101 == 0x00000000)
      {
        var214 = ((int *) var1)[893];
      }
      else
      {
        var102 = ((int *) var101)[1];
        var103 = var102 + 0xFFFFFFFF;
        ((int *) var101)[1] = var103;
        if (var103 <= 0)
        {
          var207 = ((int *) var101)[0];
          var208 = ((int *) var207)[1];
          var211 var212 = (*var208) (var101);
          var213 = ((int *) var1)[893];
        }
        else
        {
          var104 = ((int *) var1)[893];
        }
      }
      var107 = scePaf_970DC20D (var104, "msgshare_error_parental_lock");
      var108 = sp + 0x00000030;
      ((int *) sp)[12] = 0x00000000;
      var109 = sp + 0x00000050;
      ((int *) sp)[13] = 0x00000000;
      sub_33618 (var108, var107);
      var112 = ((int *) var1)[653];
      sub_09AA4 (var112, var108, 0x00000008);
      sub_335E8 (var108);
      var117 = ((int *) var1)[893];
      var120 = scePaf_970DC20D (var117, "msgshare_umd");
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      sub_33618 (var108, var120);
      var123 = ((int *) var1)[653];
      sub_09AA4 (var123, var108, 0x00000009);
      sub_335E8 (var108);
    }
    sub_207BC (var1);
    __asm__ ("mtc1       $zr, $fpr13;");
    var130 = 0x43160000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43160000));
    var131 = ((int *) var1)[653];
    vsh_26078FD6 (var131);
    var134 = ((int *) var1)[651];
    scePaf_047C9996 (var109, var134, "tex_playing");
    var137 = ((int *) var1)[651];
    scePaf_047C9996 (var40, var137, "tex_playing_shadow");
    var140 = ((int *) var1)[653];
    sub_09B10 (var140);
    var143 = ((int *) sp)[8];
    if (var143 == 0x00000000)
    {
      var146 = ((int *) sp)[20];
    }
    else
    {
      var144 = ((int *) var143)[1];
      var145 = var144 + 0xFFFFFFFF;
      ((int *) var143)[1] = var145;
      if (var145 <= 0)
      {
        var201 = ((int *) var143)[0];
        var202 = ((int *) var201)[1];
        var205 var206 = (*var202) (var143);
        var146 = ((int *) sp)[20];
      }
      else
      {
        var146 = ((int *) sp)[20];
      }
    }
    var147 = var1 + 0x00000100;
    if (var146 == 0x00000000)
    {

    label322:
      var150 = 0x00000001;
    }
    else
    {
      var148 = ((int *) var146)[1];
      var149 = var148 + 0xFFFFFFFF;
      ((int *) var146)[1] = var149;
      if (var149 <= 0)
      {
        var195 = ((int *) var146)[0];
        var196 = ((int *) var195)[1];
        var147 = var1 + 0x00000100;
        var199 var200 = (*var196) (var146);
        var150 = 0x00000001;
      }
      else
      {
        var147 = var1 + 0x00000100;
        goto label322;
      }
    }
    while (1) {
      var153 = sub_1B644 (var1);
      var154 = ((int *) var153)[0];
      var155 = ((int *) var1)[56];
      var150 = var150 + 0xFFFFFFFF;
      if (var154 == var155)
      {
        var192 = ((int *) var1)[653];

      label331:
        sub_09BB8 (var192, 0x00000001);
      }
      else
      {
        var158 = sub_1B644 (var1);
        var159 = ((int *) var158)[1];
        var160 = ((int *) var147)[0];
        if (var160 == var159)
        {
          var192 = ((int *) var1)[653];
          goto label331;
        }
      }
      var147 = var147 + 0x00000004;
      if (var150 >= 0)
        continue;
      break;
    }
    var161 = ((int *) var1)[653];
    var162 = ((int *) var161)[11];
    if (var162 == 0x00000002)
    {
      var185 = ((int *) var161)[10];
      if (var185 == 0x00001000)
      {
        var179 = ((int *) var1)[652];

      label344:
        var180 = ((int *) var179)[206];
        var183 = scePaf_BE7032D1 (var179, 0xFFFFFFFF);
        var184 = ((int *) var1)[652];
        __asm__ ("mtc1       $zr, $fpr13;");
      }
      else
      {
        var186 = ((int *) var1)[652];
        var187 = ((int *) var186)[206];
        var190 = scePaf_BE7032D1 (var186, 0xFFFFFFFF);
        var191 = ((int *) var1)[652];
        __asm__ ("mtc1       $zr, $fpr13;");

      label350:
      }
    }
    else
    {
      var163 = ((int *) var161)[10];
      if (var163 == 0x00001000)
      {
        var179 = ((int *) var1)[652];
        goto label344;
      }
      else
      {
        var164 = ((int *) var1)[652];
        var165 = ((int *) var164)[206];
        var168 = scePaf_BE7032D1 (var164, 0xFFFFFFFF);
        var169 = ((int *) var1)[652];
        __asm__ ("mtc1       $zr, $fpr13;");
        goto label350;
      }
    }
    var170 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_D9D11B9A (var169, var165, var168, 0x00000001, 0x00000001);
    ((char *) var1)[3672] = 0x00000001;
    ra = ((int *) sp)[34];
  }
  else
  {
    vsh_794760F5 (var8, 0x0002059C, var1);
    var11 = ((int *) var1)[653];
    if (var11 == 0x00000000)
    {
      var20 = var1;
      goto label22;
    }
    else
    {
      var12 = ((unsigned char *) var11)[48];
      ra = ((int *) sp)[34];
      if (!(var12 != 0x00000000))
      {
        var15 = sub_21684 (var1, var5);
        var16 = ((int *) var1)[653];
        sub_076EC (var16, (!(var15) ? 0x00001000 : 0x00000100));
        var19 = ((int *) var1)[653];
        if (var19 != 0x00000000)
        {
          sub_0781C (var19);
          var20 = var1;
        }
        else
        {
          var20 = var1;
        }
        goto label22;
      }
    }
  }
  var173 = ((int *) sp)[33];
  var174 = ((int *) sp)[32];
  var175 = ((int *) sp)[31];
  var176 = ((int *) sp)[30];
  var177 = ((int *) sp)[29];
  var178 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x0002059C
 */
void sub_2059C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((unsigned char *) arg1)[273];
  if (var1 != 0x00000000)
  {
    var2 = ((int *) arg1)[48];
    ((int *) arg1)[48] = (var2 | 0x00000004);
    sub_22C20 (arg1);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000205D0
 */
void sub_205D0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var2 = ((int *) arg1)[653];
  if (var2 != 0x00000000)
  {
    vsh_489F6A4F (var2);
    scePaf_4508F2FA (var2);
    ((int *) var1)[653] = 0x00000000;
  }
  ((char *) var1)[3672] = 0x00000000;
  sub_21B28 (var1);
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00020628
 */
void sub_20628 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[653];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label40:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((unsigned char *) arg1)[3672];
    var4 = sp;
    if (!(var3 != 0x00000000))
      goto label40;
    sub_32328 (var4, 0x00000000);
    var8 = ((int *) var2)[653];
    var9 = sp;
    vsh_DA00CA52 (var8, var9, 0x00000002);
    var12 = ((int *) sp)[0];
    if (var12 == 0x00000000)
    {
      var15 = sp;
    }
    else
    {
      var13 = ((int *) var12)[1];
      var14 = var13 + 0xFFFFFFFF;
      ((int *) var12)[1] = var14;
      if (var14 <= 0)
      {
        var53 = ((int *) var12)[0];
        var54 = ((int *) var53)[1];
        var57 var58 = (*var54) (var12);
        var15 = sp;
      }
      else
      {
        var15 = sp;
      }
    }
    sub_32328 (var15, 0x00000000);
    var18 = ((int *) var2)[653];
    var19 = sp;
    vsh_DA00CA52 (var18, var19, 0x00000003);
    var22 = ((int *) sp)[0];
    if (var22 == 0x00000000)
    {
      var25 = sp;
    }
    else
    {
      var23 = ((int *) var22)[1];
      var24 = var23 + 0xFFFFFFFF;
      ((int *) var22)[1] = var24;
      if (var24 <= 0)
      {
        var47 = ((int *) var22)[0];
        var48 = ((int *) var47)[1];
        var51 var52 = (*var48) (var22);
        var25 = sp;
      }
      else
      {
        var25 = sp;
      }
    }
    sub_32328 (var25, 0x00000000);
    var28 = ((int *) var2)[653];
    var29 = sp;
    vsh_DA00CA52 (var28, var29, 0x00000005);
    var32 = ((int *) sp)[0];
    if (!(var32 == 0x00000000))
    {
      var33 = ((int *) var32)[1];
      var34 = var33 + 0xFFFFFFFF;
      ((int *) var32)[1] = var34;
      if (var34 <= 0)
      {
        var41 = ((int *) var32)[0];
        var42 = ((int *) var41)[1];
        var45 var46 = (*var42) (var32);
      }
    }
    __asm__ ("mtc1       $zr, $fpr13;");
    var35 = 0x42DC0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42DC0000));
    var36 = ((int *) var2)[653];
    vsh_8EFFA7C3 (var36);
    sub_1D7D0 (var2);
    ra = ((int *) sp)[5];
  }
  var5 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002076C
 */
int sub_2076C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var4 = sub_21720 (arg1);
  var7 = sub_21684 (var1, var4);
  var8 = 0x00000000;
  if (var7 == 0x00000000)
  {

  label9:
    ra = ((int *) sp)[1];
  }
  else
  {
    var9 = ((int *) var1)[888];
    ra = ((int *) sp)[1];
    if (!(var9 == 0x00000000))
    {
      var10 = ((int *) var9)[0];
      var8 = (0x00000000 < var10);
      goto label9;
    }
  }
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var8;
}

/**
 * Subroutine at address 0x000207BC
 */
void sub_207BC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[653];
  var2 = arg1;
  if (var1 != 0x00000000)
  {
    var6 = vsh_1B1CE2CF ();
    var7 = sp;
    if (var6 != 0x00000000)
    {
      var17 = ((int *) var2)[653];
      var18 = 0x3F7F7CEE;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F7F7CEE));
      var19 = sp;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var20 = 0x3F7EF9DB;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(0x3F7EF9DB), "=r"(sp));
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_09E6C (var17, var19, 0x00000000);
      var23 = 0x3F7F3B64;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F7F3B64));
      var13 = ((int *) var2)[653];
      ((int *) sp)[0] = 0x00000000;
      var14 = sp;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var24 = 0x3F7E76C9;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F7E76C9));
    }
    else
    {
      var8 = ((int *) var2)[653];
      var9 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 8($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_09E6C (var8, var7, 0x00000000);
      var12 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var13 = ((int *) var2)[653];
      var14 = sp;
      ((int *) sp)[0] = 0x00000000;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
    }
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    sub_09E6C (var13, var14, 0x00000001);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var3 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000208AC
 */
int sub_208AC (int arg1)
{
  var1 = ((int *) arg1)[653];
  var2 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    var2 = ((unsigned char *) var1)[48];
  }
  return var2;
}

/**
 * Subroutine at address 0x000208C4
 */
int sub_208C4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = 0x00000000;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) arg1)[284];
  var3 = arg1;
  if (var2 == 0x00000000)
  {

  label21:
    ra = ((int *) sp)[1];

  label22:
    var5 = ((int *) sp)[0];
  }
  else
  {
    var4 = ((unsigned char *) arg1)[272];
    if (!(var4 != 0x00000000))
      goto label21;
    var8 = sub_21E8C (arg1, 0x00000001);
    var11 = sub_21E8C (var3, 0x00000000);
    var1 = 0x00000000;
    if (var11 != 0x00000000)
      goto label21;
    var12 = ((unsigned char *) var3)[274];
    ra = ((int *) sp)[1];
    if (var12 == 0x00000000)
      goto label22;
    var13 = ((unsigned char *) var3)[3556];
    if (var13 != 0x00000000)
    {
      var5 = ((int *) sp)[0];
    }
    else
    {
      var14 = ((unsigned char *) var3)[273];
      if (var14 != 0x00000000)
      {
        var5 = ((int *) sp)[0];
      }
      else
      {
        var15 = ((int *) var3)[893];
        var18 = scePaf_11FA6015 (var15, "page_optionmenu");
        var1 = 0x00000000;
        if (!(var18 != 0x00000000))
        {
          var19 = ((int *) var3)[893];
          var22 = scePaf_11FA6015 (var19, "page_info");
          var1 = 0x00000001;
          if (!(var22 == 0x00000000))
          {
            var1 = 0x00000000;
          }
        }
        goto label21;
      }
    }
  }
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x00020978
 */
void sub_20978 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[0] = s0;
  var3 = arg1 + 0x00000120;
  while (1) {
    var4 = ((int *) var1)[652];
    var7 = scePaf_BE7032D1 (var4, var2);
    var10 = sub_1B68C (var1, var2, var7);
    var2 = var2 + 0x00000001;
    var11 = 0x0000002A;
    if (!(var10 == 0x00000000))
    {
      var11 = ((int *) var10)[0];
    }
    ((int *) var3)[0] = var11;
    var3 = var3 + 0x00000004;
    if (((var2 < 0x00000008)) != 0x00000000)
      continue;
    break;
  }
  var14 = sub_1B644 (var1);
  if (var14 == 0x00000000)
  {
    ((int *) var1)[63] = 0x00000000;
  }
  else
  {
    var15 = ((int *) var14)[1];
    ((int *) var1)[63] = var15;
  }
  ra = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00020A04
 */
int sub_20A04 (int arg1, int arg2)
{
  var1 = arg2 + 0xFFFFFFFB;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  if (((var1 < 0x00000006)) == 0x00000000)
  {
  case 2:
  case 4:
  case 5:

  label4:
    var15 = 0xFFFFFC0D;
  }
  else
  {
    var2 = ((int *) ((var1 << 0x00000002) + 0x0004310C))[0];
    switch () {
    case 0:
    case 1:
    case 3:
      var5 = scePaf_A78805B0 ("launcher_plugin");
      var6 = 0x00000000;
      if (var5 == 0x00000000)
      {

      label15:
        var15 = var6;
      }
      else
      {
        var9 = scePaf_4E87FDFC (var5, 0x00000001);
        if (var9 == 0x00000000)
        {
          var15 = 0x00000000;
        }
        else
        {
          var10 = ((int *) var9)[1];
          var13 var14 = (*var10) (0x000000FF);
          var6 = var13;
          goto label15;
        }
      }
    goto label4;
    goto label4;
    goto label4;
    }
  }
  ra = ((int *) sp)[1];
  var16 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var15;
}

/**
 * Subroutine at address 0x00020A8C
 */
int sub_20A8C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[882];
  ((int *) sp)[0] = 0x00000000;
  var2 = ((int *) var1)[33];
  var5 var6 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var7 = sp;
  var8 = 0x00000000;
  if (var5 == 0x00000002)
  {
    sub_261C4 ((arg1 + 0x00000A3C), var7);
    var8 = ((int *) sp)[0];
  }
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var8;
}

/**
 * Subroutine at address 0x00020AE8
 */
int sub_20AE8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[882];
  ((int *) sp)[0] = 0x00000000;
  var2 = ((int *) var1)[33];
  var5 var6 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var7 = sp;
  var8 = 0x00000000;
  if (var5 == 0x00000002)
  {
    sub_2621C ((arg1 + 0x00000A3C), var7);
    var8 = ((int *) sp)[0];
  }
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var8;
}

/**
 * Subroutine at address 0x00020B44
 */
void sub_20B44 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFE50;
  ((int *) sp)[103] = s3;
  ((int *) sp)[102] = s2;
  var1 = arg2;
  var2 = arg1;
  ((int *) sp)[105] = ra;
  ((int *) sp)[104] = s4;
  ((int *) sp)[101] = s1;
  ((int *) sp)[100] = s0;
  var3 = ((int *) arg2)[2];
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if ((var3 & 0x00000010) != 0x00000000)
  {
    var176 = sp;
    sub_318F0 (var176, "disc0:/PSP_GAME/");
    var181 = scePaf_967A56EF (0x00039914);
    var182 = sp;
    var185 = sub_33528 (var182, 0x00039914, var181);
    var188 = scePaf_48BB05D5 (0x00000010);
    var189 = ((int *) sp)[0];
    var190 = var188;
    vsh_5EDB37F1 (var188, var189);
    var193 = ((unsigned char *) var190)[0];
    var194 = sp + 0x00000020;
    if (var193 != 0x00000000)
    {
      var201 = vsh_E7100874 (var190, "TITLE", var194, 0x00000100);
      var202 = var1 + 0x0000000C;
      var203 = var194;
      if (!(var201 == 0x00000000))
      {
        var204 = ((int *) var2)[893];
        var207 = scePaf_970DC20D (var204, "msgshare_info_none");
        var202 = (var1 + 0x0000000C);
        var203 = var207;
      }
      sub_33618 (var202, var203);
      sub_21158 (var2, (var1 + 0x00000028), var190);
      var214 = vsh_AC6CA3B8 (var190, "PARENTAL_LEVEL", (var1 + 0x00000018), 0x00000004);
      if (var214 != 0x00000000)
      {
        ((int *) var1)[6] = 0x00000000;
      }
      var215 = ((int *) var1)[6];
      if (var215 < 0)
      {
        ((int *) var1)[6] = 0x0000000B;
      }
      else
      {
      }
      var216 = sp + 0x00000120;
      var219 = vsh_AC6CA3B8 (var190, "PSP_SYSTEM_VER", var216, 0x00000008);
      if (var219 == 0x00000000)
      {
        var222 = vsh_4F777346 (var216);
        var223 = var222;
        if (var223 == 0xFFFFFBD1)
        {

        label42:
          ((int *) var1)[8] = 0x00000064;
        }
        else
        {
          ((int *) var1)[8] = var223;
        }
      }
      else
      {
        goto label42;
      }
    }
    vsh_05BA46CE (var190);
    scePaf_4508F2FA (var190);
    var3 = ((int *) var1)[2];
  }
  if ((var3 & 0x00000040) != 0x00000000)
  {
    var123 = sp;
    sub_318F0 (var123, "disc0:/UMD_VIDEO/");
    var128 = scePaf_967A56EF (0x00039914);
    var129 = sp;
    var132 = sub_33528 (var129, 0x00039914, var128);
    var135 = scePaf_48BB05D5 (0x00000010);
    var136 = ((int *) sp)[0];
    var137 = var135;
    vsh_5EDB37F1 (var135, var136);
    var140 = ((unsigned char *) var137)[0];
    var141 = sp + 0x00000020;
    if (var140 != 0x00000000)
    {
      var148 = vsh_E7100874 (var137, "TITLE", var141, 0x00000100);
      var149 = var1 + 0x000001C4;
      var150 = var141;
      if (!(var148 == 0x00000000))
      {
        var151 = ((int *) var2)[893];
        var154 = scePaf_970DC20D (var151, "msgshare_info_none");
        var149 = (var1 + 0x000001C4);
        var150 = var154;
      }
      sub_33618 (var149, var150);
      sub_21158 (var2, (var1 + 0x000001E0), var137);
      var161 = vsh_AC6CA3B8 (var137, "PARENTAL_LEVEL", (var1 + 0x000001D0), 0x00000004);
      if (var161 != 0x00000000)
      {
        ((int *) var1)[116] = 0x00000000;
      }
      var162 = ((int *) var1)[116];
      if (var162 < 0)
      {
        ((int *) var1)[116] = 0x0000000B;
      }
      else
      {
      }
      var163 = sp + 0x00000120;
      var166 = vsh_AC6CA3B8 (var137, "PSP_SYSTEM_VER", var163, 0x00000008);
      if (var166 == 0x00000000)
      {
        var174 = vsh_4F777346 (var163);
        var175 = var174;
        if (var175 == 0xFFFFFBD1)
        {

        label89:
          ((int *) var1)[118] = 0x00000064;
        }
        else
        {
          ((int *) var1)[118] = var175;
        }
      }
      else
      {
        goto label89;
      }
      var167 = ((int *) var1)[2];
      if ((var167 & 0x00000020) == 0x00000000)
      {
        var170 = vsh_AC6CA3B8 (var137, "MUSIC_VIDEO", (var1 + 0x000001DC), 0x00000004);
        if (var170 != 0x00000000)
        {
          ((int *) var1)[119] = 0x00000000;
        }
        else
        {
          var171 = ((int *) var1)[119];
          if (var171 != 0x00000001)
          {
            ((int *) var1)[119] = 0x00000000;
          }
          else
          {
            ((int *) var1)[119] = 0x00000008;
          }
        }
      }
      else
      {
        ((int *) var1)[119] = 0x00000000;
      }
    }
    vsh_05BA46CE (var137);
    scePaf_4508F2FA (var137);
    var3 = ((int *) var1)[2];
  }
  if ((var3 & 0x00000020) != 0x00000000)
  {
    var71 = sp;
    sub_318F0 (var71, "disc0:/UMD_AUDIO/");
    var76 = scePaf_967A56EF (0x00039914);
    var77 = sp;
    var80 = sub_33528 (var77, 0x00039914, var76);
    var83 = scePaf_48BB05D5 (0x00000010);
    var84 = ((int *) sp)[0];
    var85 = var83;
    vsh_5EDB37F1 (var83, var84);
    var88 = ((unsigned char *) var85)[0];
    var89 = sp + 0x00000020;
    if (var88 != 0x00000000)
    {
      var96 = vsh_E7100874 (var85, "TITLE", var89, 0x00000100);
      var97 = var1 + 0x000000E8;
      var98 = var89;
      if (!(var96 == 0x00000000))
      {
        var99 = ((int *) var2)[893];
        var102 = scePaf_970DC20D (var99, "msgshare_info_none");
        var97 = (var1 + 0x000000E8);
        var98 = var102;
      }
      sub_33618 (var97, var98);
      sub_21158 (var2, (var1 + 0x00000104), var85);
      var109 = vsh_AC6CA3B8 (var85, "PARENTAL_LEVEL", (var1 + 0x000000F4), 0x00000004);
      if (var109 != 0x00000000)
      {
        ((int *) var1)[61] = 0x00000000;
      }
      var110 = ((int *) var1)[61];
      if (var110 < 0)
      {
        ((int *) var1)[61] = 0x0000000B;
      }
      else
      {
      }
      var111 = sp + 0x00000120;
      var114 = vsh_AC6CA3B8 (var85, "PSP_SYSTEM_VER", var111, 0x00000008);
      if (var114 == 0x00000000)
      {
        var121 = vsh_4F777346 (var111);
        var122 = var121;
        if (var122 == 0xFFFFFBD1)
        {

        label146:
          ((int *) var1)[63] = 0x00000064;
        }
        else
        {
          ((int *) var1)[63] = var122;
        }
      }
      else
      {
        goto label146;
      }
      var117 = vsh_AC6CA3B8 (var85, "VIDEO_CONTENTS", (var1 + 0x00000100), 0x00000004);
      if (var117 != 0x00000000)
      {
        ((int *) var1)[64] = 0x00000000;
      }
      else
      {
        var118 = ((int *) var1)[64];
        if (!(var118 == 0x00000001))
        {
          ((int *) var1)[64] = 0x00000000;
        }
      }
    }
    vsh_05BA46CE (var85);
    scePaf_4508F2FA (var85);
    var3 = ((int *) var1)[2];
  }
  if ((var3 & 0x00000080) != 0x00000000)
  {
    ((char *) var1)[684] = 0x00000001;
    var18 = sp;
    sub_318F0 (var18, 0x000398F4);
    var23 = scePaf_967A56EF (0x00039914);
    var24 = sp;
    var27 = sub_33528 (var24, 0x00039914, var23);
    var30 = scePaf_48BB05D5 (0x00000010);
    var31 = ((int *) sp)[0];
    var32 = var30;
    vsh_5EDB37F1 (var30, var31);
    var35 = ((unsigned char *) var32)[0];
    var36 = sp + 0x00000020;
    if (var35 != 0x00000000)
    {
      var43 = vsh_E7100874 (var32, "TITLE", var36, 0x00000100);
      if (!(var43 != 0x00000000))
      {
        sub_33618 ((var1 + 0x000002A0), var36);
        var46 = sp;
        sub_318F0 (var46, 0x000398F4);
        var51 = scePaf_967A56EF (0x00039928);
        var52 = sp;
        var55 = sub_33528 (var52, 0x00039928, var51);
        var56 = ((int *) sp)[0];
        var57 = sp + 0x00000130;
        var60 = IoFileMgrForUser_ACE946E8 (var56, var57);
        var61 = sp + 0x00000120;
        if (!(var60 != 0x00000000))
        {
          var64 = vsh_AC6CA3B8 (var32, "UPDATER_VER", var61, 0x00000008);
          if (!(var64 != 0x00000000))
          {
            var67 = vsh_4F777346 (var61);
            var68 = var67;
            if (!(var68 == 0xFFFFFBD1))
            {
              ((int *) var1)[172] = var68;
              sub_21158 (var2, (var1 + 0x000002B4), var32);
              ((char *) var1)[684] = 0x00000000;
            }
          }
        }
      }
    }
    vsh_05BA46CE (var32);
    scePaf_4508F2FA (var32);
    var4 = ((int *) var2)[882];
  }
  else
  {
    var4 = ((int *) var2)[882];
  }
  var5 = ((int *) var4)[35];
  var8 var9 = (*var5) (arg1, var3, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) var1)[1] = var8;
  var10 = sp;
  sub_317D8 (var10);
  ra = ((int *) sp)[105];
  var13 = ((int *) sp)[104];
  var14 = ((int *) sp)[103];
  var15 = ((int *) sp)[102];
  var16 = ((int *) sp)[101];
  var17 = ((int *) sp)[100];
  sp = sp + 0x000001B0;
  return;
}

/**
 * Subroutine at address 0x00021158
 */
void sub_21158 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[81] = ra;
  ((int *) sp)[72] = s0;
  ((int *) sp)[64] = 0x00000000;
  ((int *) sp)[65] = 0x00000000;
  ((int *) sp)[76] = s4;
  ((int *) sp)[80] = fp;
  ((int *) sp)[79] = s7;
  ((int *) sp)[78] = s6;
  ((int *) sp)[77] = s5;
  ((int *) sp)[75] = s3;
  var1 = sp + 0x00000100;
  ((int *) sp)[74] = s2;
  var2 = 0x00000000;
  ((int *) sp)[73] = s1;
  var3 = arg2;
  while (1) {
    sub_318F0 (var1, "TITLE_");
    var6 = ((hi (var2 * 0x66666667)) >> 0x00000002) - (var2 >> 0x0000001F);
    if (var6 != 0x00000000)
    {
      sub_33A34 (var1, 0x00000001, ((char) (var6 + 0x00000030)));
      var7 = var6 << 0x00000002;
    }
    else
    {
      var7 = var6 << 0x00000002;
    }
    sub_33A34 (var1, 0x00000001, ((char) ((var2 - ((var7 + var6) << 0x00000001)) + 0x00000030)));
    var10 = ((int *) sp)[64];
    var11 = sp;
    var14 = vsh_E7100874 (arg3, var10, var11, 0x00000100);
    var15 = sp;
    if (var14 != 0x00000000)
    {
      ((char *) var3)[0] = 0x00000000;
      var15 = 0x0003997C;
    }
    else
    {
      ((char *) var3)[0] = 0x00000001;
    }
    var2 = var2 + 0x00000001;
    sub_33618 ((var3 + 0x00000004), var15);
    var3 = var3 + 0x00000010;
    if (((var2 < 0x0000000C)) != 0x00000000)
      continue;
    break;
  }
  sub_317D8 (var1);
  ra = ((int *) sp)[81];
  var20 = ((int *) sp)[80];
  var21 = ((int *) sp)[79];
  var22 = ((int *) sp)[78];
  var23 = ((int *) sp)[77];
  var24 = ((int *) sp)[76];
  var25 = ((int *) sp)[75];
  var26 = ((int *) sp)[74];
  var27 = ((int *) sp)[73];
  var28 = ((int *) sp)[72];
  sp = sp + 0x00000150;
  return;
}

/**
 * Subroutine at address 0x0002129C
 */
void sub_2129C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[6] = s2;
  var1 = arg3;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  var2 = arg1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[8] = ra;
  var3 = arg4;
  var6 = scePaf_2338483F ();
  var7 = ((int *) var6)[38];
  if (((var1 < 0x0000000C)) == 0x00000000)
  {
  case 0:
  case 2:
  case 6:
  case 7:
  case 8:
  case 10:

  label16:
    var9 = ((int *) arg2)[893];
    var12 = scePaf_970DC20D (var9, "msgshare_info_none");
    ((int *) var2)[0] = 0x00000000;
    ((int *) var2)[1] = 0x00000000;
    sub_33618 (var2, var12);
  }
  else
  {
    var8 = ((int *) ((var1 << 0x00000002) + 0x00043124))[0];
    switch () {
    goto label16;
    case 1:
    case 3:
      var19 = var3 + 0x000000E8;
      var20 = var3 + 0x00000104;

    label10:
      var21 = (var7 << 0x00000004) + var20;
      var22 = ((unsigned char *) var21)[0];
      if (var22 == 0x00000000)
      {
        ((int *) var2)[0] = 0x00000000;
        var23 = var19;
        var24 = var2;
      }
      else
      {
        var23 = var21 + 0x00000004;
        var24 = var2;
        ((int *) var2)[0] = 0x00000000;
      }
      ((int *) var2)[1] = 0x00000000;
      sub_33668 (var24, var23);
      goto label21;
    goto label16;
    case 4:
    case 5:
      var19 = var3 + 0x000001C4;
      var20 = var3 + 0x000001E0;
      goto label10;
    goto label16;
    goto label16;
    goto label16;
    case 9:
      var19 = var3 + 0x0000000C;
      var20 = var3 + 0x00000028;
      goto label10;
    goto label16;
    case 11:
      var19 = var3 + 0x000002A0;
      var20 = var3 + 0x000002B4;
      goto label10;
    }
  }

label21:
  ra = ((int *) sp)[8];
  var15 = ((int *) sp)[7];
  var16 = ((int *) sp)[6];
  var17 = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000213B0
 */
int sub_213B0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[29] = s1;
  var1 = arg4;
  var2 = sp;
  ((int *) sp)[30] = ra;
  ((int *) sp)[28] = s0;
  sub_1BCB8 (var2, arg1, arg2, arg3);
  var5 = sp + 0x00000010;
  var6 = ((int *) sp)[0];
  var7 = 0x00000000;
  var10 = IoFileMgrForUser_ACE946E8 (var6, var5);
  if (var10 == 0x00000000)
  {
    var17 = ((int *) sp)[6];
    ((int *) var1)[0] = var17;
  }
  else
  {
    var11 = ((int *) sp)[6];
    var7 = 0xFFFFFC0C;
    ((int *) var1)[0] = 0x00000000;
  }
  var12 = sp;
  sub_317D8 (var12);
  ra = ((int *) sp)[30];
  var15 = ((int *) sp)[29];
  var16 = ((int *) sp)[28];
  sp = sp + 0x00000080;
  return var7;
}

/**
 * Subroutine at address 0x00021424
 */
void sub_21424 (int arg1)
{
  ((char *) arg1)[2640] = 0x00000000;
  ((char *) arg1)[3674] = 0x00000000;
  ((int *) arg1)[654] = 0x00000000;
  ((int *) arg1)[655] = 0x00000000;
  ((int *) arg1)[656] = 0x00000000;
  ((int *) arg1)[657] = 0x00000000;
  ((int *) arg1)[658] = 0x00000000;
  ((int *) arg1)[659] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x00021448
 */
void sub_21448 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s6;
  ((int *) sp)[5] = s5;
  var1 = arg1;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  var3 = 0x0000000A;
  ((int *) sp)[1] = s1;
  var4 = var2;
  ((int *) sp)[0] = s0;
  ((char *) arg1)[3673] = 0x00000000;
  ((int *) var2)[1] = 0x00000000;
  var5 = ((int *) arg1)[893];
  ((char *) var2)[0] = 0x00000000;
  ((int *) var2)[2] = 0x00000000;
  var8 = scePaf_970DC20D (var5, "msgshare_info_none");
  sub_33618 ((var2 + 0x0000000C), var8);
  ((int *) var2)[7] = 0x0000000B;
  ((int *) var2)[8] = 0x00000064;
  ((int *) var2)[6] = 0x00000000;
  ((int *) var2)[9] = 0x00000000;
  while (1) {
    ((char *) var4)[40] = 0x00000000;
    var3 = var3 + 0xFFFFFFFF;
    sub_33618 ((var4 + 0x0000002C), 0x0003997C);
    var4 = var4 + 0x00000010;
    if (var3 >= 0)
      continue;
    break;
  }
  var13 = ((int *) var1)[893];
  var16 = scePaf_970DC20D (var13, "msgshare_info_none");
  sub_33618 ((var2 + 0x000000E8), var16);
  ((int *) var2)[62] = 0x0000000B;
  var19 = var2;
  var20 = 0x0000000A;
  ((int *) var2)[63] = 0x00000064;
  ((int *) var2)[61] = 0x00000000;
  ((int *) var2)[64] = 0x00000000;
  while (1) {
    ((char *) var19)[260] = 0x00000000;
    var20 = var20 + 0xFFFFFFFF;
    sub_33618 ((var19 + 0x00000108), 0x0003997C);
    var19 = var19 + 0x00000010;
    if (var20 >= 0)
      continue;
    break;
  }
  var23 = ((int *) var1)[893];
  var26 = scePaf_970DC20D (var23, "msgshare_info_none");
  sub_33618 ((var2 + 0x000001C4), var26);
  ((int *) var2)[117] = 0x0000000B;
  var29 = var2;
  var30 = 0x0000000A;
  ((int *) var2)[118] = 0x00000064;
  ((int *) var2)[116] = 0x00000000;
  ((int *) var2)[119] = 0x00000000;
  while (1) {
    ((char *) var29)[480] = 0x00000000;
    var30 = var30 + 0xFFFFFFFF;
    sub_33618 ((var29 + 0x000001E4), 0x0003997C);
    var29 = var29 + 0x00000010;
    if (var30 >= 0)
      continue;
    break;
  }
  var33 = ((int *) var1)[893];
  var36 = scePaf_970DC20D (var33, "msgshare_info_none");
  sub_33618 ((var2 + 0x000002A0), var36);
  ((int *) var2)[172] = 0x00000064;
  var39 = var2;
  var40 = 0x0000000A;
  ((char *) var2)[684] = 0x00000000;
  while (1) {
    ((char *) var39)[692] = 0x00000000;
    var40 = var40 + 0xFFFFFFFF;
    sub_33618 ((var39 + 0x000002B8), 0x0003997C);
    var39 = var39 + 0x00000010;
    if (var40 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[7];
  var43 = ((int *) sp)[6];
  var44 = ((int *) sp)[5];
  var45 = ((int *) sp)[4];
  var46 = ((int *) sp)[3];
  var47 = ((int *) sp)[2];
  var48 = ((int *) sp)[1];
  var49 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00021608
 */
int sub_21608 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = arg2;
  var5 = sub_1EA98 ();
  var6 = var5;
  var7 = 0x00000000;
  if (!(var6 < 0))
  {
    if (var2 == 0x00000003)
    {
      var8 = ((int *) var1)[724];
    }
    else
    {
      if (((var2 < 0x00000004)) == 0x00000000)
      {
        if (((var2 < 0x00000006)) == 0x00000000)
        {
          var8 = 0x00000064;
        }
        else
        {
          var8 = ((int *) var1)[779];
        }
      }
      else
      {
        if (var2 == 0x00000001)
        {
          var8 = ((int *) var1)[724];
        }
        else
        {
          var8 = 0x00000064;
        }
      }
    }
    var7 = (((var6 < var8)) < 0x00000001);
  }
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00021684
 */
int sub_21684 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  if (((arg2 < 0x0000000A)) == 0x00000000)
  {
  case 0:
  case 2:
  case 6:
  case 7:
  case 8:
  case 9:

  label6:
    var3 = ((int *) var1)[667];
    var4 = ((int *) var1)[668];
  }
  else
  {
    var2 = ((int *) ((arg2 << 0x00000002) + 0x00043154))[0];
    switch () {
    goto label6;
    case 1:
    case 3:
      var4 = ((int *) var1)[723];
      var3 = ((int *) var1)[722];
      goto label7;
    goto label6;
    case 4:
    case 5:
      var4 = ((int *) var1)[778];
      var3 = ((int *) var1)[777];
      goto label7;
    goto label6;
    goto label6;
    goto label6;
    goto label6;
    }
  }

label7:
  ((int *) sp)[0] = var3;
  var5 = 0x00000001;
  if (!(var4 == 0x00000000))
  {
    var6 = ((int *) sp)[0];
    var7 = sp;
    vsh_E3DD9858 (var7);
    var10 = ((int *) sp)[0];
    if (((var10 < (MIN (var4, var6)))) == 0x00000000)
    {
      var5 = 0x00000001;
    }
    else
    {
      var5 = 0x00000000;
      if (!(var10 != 0x00000000))
      {
        var5 = 0x00000001;
      }
    }
  }
  ra = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var5;
}

/**
 * Subroutine at address 0x00021720
 */
int sub_21720 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_1B644 (arg1);
  var4 = 0xFFFFFFFF;
  if (!(var3 == 0x00000000))
  {
    var5 = ((int *) var3)[0];
    if (var5 == 0x00000010)
    {
      var6 = 0x00000001;

    label17:
      var4 = var6;
    }
    else
    {
      if (((var5 < 0x00000011)) == 0x00000000)
      {
        if (var5 == 0x00000011)
        {
          var6 = 0x00000005;
          goto label17;
        }
        else
        {
          if (var5 != 0x00000015)
          {
            var4 = 0xFFFFFFFF;
          }
          else
          {
            var6 = 0x00000009;
            goto label17;
          }
        }
      }
      else
      {
        if (var5 == 0x0000000E)
        {
          var6 = 0x00000001;
          goto label17;
        }
        else
        {
          var4 = 0xFFFFFFFF;
        }
      }
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00021798
 */
void sub_21798 (int arg1, int arg2)
{
  var1 = arg1;
  if (((arg2 < 0x0000000A)) == 0x00000000)
  {
  case 0:
  case 2:
  case 6:
  case 7:
  case 8:
  case 9:

  label6:
    ((int *) var1)[668] = 0x00000000;
  }
  else
  {
    var2 = ((int *) ((arg2 << 0x00000002) + 0x0004317C))[0];
    switch () {
    goto label6;
    case 1:
    case 3:
      ((int *) var1)[723] = 0x00000000;
      goto label7;
    goto label6;
    case 4:
    case 5:
      ((int *) var1)[778] = 0x00000000;
      goto label7;
    goto label6;
    goto label6;
    goto label6;
    goto label6;
    }
  }

label7:
  return;
}

/**
 * Subroutine at address 0x000217D8
 */
void sub_217D8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg2;
  ((int *) sp)[6] = s2;
  var2 = arg1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[7] = ra;
  var5 = sub_21684 (var1, arg3);
  if (var5 == 0x00000000)
  {
    var11 = ((int *) var1)[893];
    var14 = scePaf_970DC20D (var11, "msgshare_info_none");
    ((int *) var2)[0] = 0x00000000;
    ((int *) var2)[1] = 0x00000000;
    sub_33618 (var2, var14);
  }
  else
  {
    sub_2129C (var2, var1, arg3, (var1 + 0x00000A54));
  }
  ra = ((int *) sp)[7];
  var8 = ((int *) sp)[6];
  var9 = ((int *) sp)[5];
  var10 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002186C
 */
void sub_2186C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg1)[882];
  var2 = ((int *) var1)[33];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var8 = 0xFFFFFC0E;
  if (!(var6 != 0x00000002))
  {
    var9 = ((int *) var3)[882];
    var10 = ((int *) var9)[36];
    var13 var14 = (*var10) ();
    var15 = ((int *) var3)[654];
    var8 = 0xFFFFFC0E;
    if (!(var15 != var13))
    {
      sub_26164 ((var3 + 0x00000A3C));
      var8 = 0x00000000;
    }
  }
  ra = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000218D4
 */
void sub_218D4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s4;
  var2 = 0x00000001;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[2] = s2;
  var5 = sub_1B644 (arg1);
  var6 = var5;
  var7 = ((int *) var1)[62];
  if (((((var7 ^ 0x00000006) < 0x00000001)) | (((var7 ^ 0x00000008) < 0x00000001))) != 0x00000000)
  {

  label7:
    var43 = sub_20A04 (var1, var7);
    if ((var43 & 0x00000004) != 0x00000000)
    {
      var2 = 0x00000000;

    label36:
    }
    else
    {
      var46 = scePaf_A78805B0 ("launcher_plugin");
      if (var46 == 0x00000000)
        goto label36;
      var49 = scePaf_4E87FDFC (var46, 0x00000001);
      if (!(var49 == 0x00000000))
      {
        var50 = ((int *) var49)[11];
        var53 var54 = (*var50) ();
        var2 = (0x00000000 < (var53 ^ 0x00000001));
      }
    }
  }
  else
  {
    if (var7 == 0x00000005)
    {
      goto label7;
    }
    else
    {
      if (var7 == 0x00000010)
      {

      label34:
        var2 = 0x00000000;
      }
      else
      {
        if (var7 == 0x00000014)
        {
          goto label34;
        }
        else
        {
          if (var7 == 0x00000016)
          {
            goto label34;
          }
          else
          {
            if (var7 == 0x0000001D)
            {
              goto label34;
            }
            else
            {
              if (var7 == 0x0000001A)
              {
                goto label34;
              }
              else
              {
                if (var7 == 0x00000013)
                {
                  goto label34;
                }
                else
                {
                  if (var7 == 0x00000018)
                  {
                    goto label34;
                  }
                  else
                  {
                    var2 = !((var7 ^ 0x00000012)) ? 0x00000000 : (!((var7 ^ 0x0000001B)) ? 0x00000000 : 0x00000001);
                  }
                }
              }
            }
          }
        }
      }
      goto label36;
    }
  }
  if (var6 != 0x00000000)
  {
    var8 = ((int *) var6)[1];
  }
  var9 = ((int *) var1)[888];
  if (var9 == 0x00000000)
  {
    var35 = scePaf_48BB05D5 (0x00000040);
    var36 = var35;
    var37 = ((int *) var1)[893];
    var38 = ((int *) var37)[103];
    sub_21FF8 (var36, var38);
    ((int *) var36)[5] = var8;
    ((int *) var1)[888] = var36;

  label51:
    ((int *) var1)[51] = 0x00000000;
  }
  else
  {
    var10 = ((int *) var9)[5];
    if (var10 == var8)
    {
      var32 = ((int *) var1)[51];
      ((int *) var1)[51] = (var32 & 0x00000008);
    }
    else
    {
      sub_22224 (var9);
      var13 = ((int *) var1)[888];
      ((int *) var13)[5] = var8;
      goto label51;
    }
  }
  var14 = ((int *) var1)[62];
  if (var14 == 0x00000006)
  {
    var31 = sub_20A04 (var1, 0x00000006);
    if (var31 == 0x00000001)
    {
      var25 = ((int *) var1)[51];

    label68:
      var24 = var25 | 0x00000003;

    label75:
      ((int *) var1)[51] = var24;
    }
    else
    {
      var14 = ((int *) var1)[62];

    label58:
      if (((((var14 ^ 0x00000006) < 0x00000001)) | (((var14 ^ 0x00000008) < 0x00000001))) != 0x00000000)
      {

      label60:
        var28 = sub_20A04 (var1, var14);
        if (!((var28 & 0x0000000A) == 0x00000000))
        {
          var23 = ((int *) var1)[51];

        label74:
          var24 = var23 | 0x00000002;
          goto label75;
        }
      }
      else
      {
        if (var14 == 0x00000005)
          goto label60;
        if (((((var14 + 0xFFFFFFF7) < 0x00000002)) | (((var14 ^ 0x00000007) < 0x00000001))) != 0x00000000)
        {
          var25 = ((int *) var1)[51];
          goto label68;
        }
        else
        {
          if (var14 == 0x00000012)
          {
            var25 = ((int *) var1)[51];
            goto label68;
          }
          else
          {
            if (var14 == 0x00000008)
            {
              var22 = sub_20A04 (var1, 0x00000006);
              if (!(var22 != var14))
              {
                var23 = ((int *) var1)[51];
                goto label74;
              }
            }
          }
        }
      }
    }
  }
  else
  goto label58;
  ra = ((int *) sp)[5];
  if (!(var2 != 0x00000000))
  {
    ((int *) var1)[51] = 0x00000010;
  }
  var15 = ((int *) sp)[4];
  var16 = ((int *) sp)[3];
  var17 = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00021B28
 */
void sub_21B28 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[888];
  if (var1 != 0x00000000)
  {
    sub_220D8 (var1);
    scePaf_4508F2FA (var1);
    ((int *) arg1)[888] = 0x00000000;
  }
  ra = ((int *) sp)[2];
  var2 = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00021B74
 */
void sub_21B74 (int arg1)
{
  var1 = ((int *) arg1)[888];
  if (var1 != 0x00000000)
  {
    ((int *) var1)[5] = 0x00000000;
  }
  return;
}

/**
 * Subroutine at address 0x00021B88
 */
int sub_21B88 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s2;
  var1 = arg1;
  ((int *) sp)[9] = s1;
  ((int *) sp)[11] = ra;
  ((int *) sp)[8] = s0;
  var2 = ((int *) arg1)[51];
  var3 = arg2;
  if ((var2 & 0x00000004) != 0x00000000)
  {
    var37 = ((int *) arg1)[888];
    var17 = 0xFFFFF05F;
    ((int *) ((arg2 << 0x00000002) + var37))[10] = 0x00000000;
  }
  else
  {
    var4 = sp;
    sub_1BCB8 (var4, var1, var3, arg3);
    if (var3 < 0)
    {

    label15:
      var27 = sp;
      sub_317D8 (var27);
      var17 = 0xFFFFFC0D;
    }
    else
    {
      if (((var3 < 0x00000003)) != 0x00000000)
      {
        var30 = sp + 0x00000010;
        var31 = sp;
        ((int *) sp)[4] = 0x00000000;
        ((int *) sp)[5] = 0x00000000;
        sub_31940 (var30, var31);
        var34 = ((int *) var1)[888];
        var15 = sub_22334 (var34, var3, var30);
        var16 = var30;

      label28:
        var17 = var15;
        sub_317D8 (var16);
        var20 = sp;

      label31:
        sub_317D8 (var20);
      }
      else
      {
        if ((((var3 + 0xFFFFFFFC) < 0x00000002)) == 0x00000000)
          goto label15;
        var7 = ((int *) var1)[51];
        if ((var7 & 0x00000001) == 0x00000000)
        {

        label23:
          var8 = sp + 0x00000010;
          var9 = sp;
          ((int *) sp)[4] = 0x00000000;
          ((int *) sp)[5] = 0x00000000;
          sub_31940 (var8, var9);
          var12 = ((int *) var1)[888];
          var15 = sub_228B4 (var12, var3, var8);
          var16 = var8;
          goto label28;
        }
        else
        {
          if (!((var7 & 0x00000002) != 0x00000000))
            goto label23;
          var26 = ((int *) var1)[888];
          var20 = sp;
          ((int *) ((var3 << 0x00000002) + var26))[10] = 0x00000000;
          var17 = 0xFFFFF05F;
        }
        goto label31;
      }
    }
  }
  ra = ((int *) sp)[11];
  var23 = ((int *) sp)[10];
  var24 = ((int *) sp)[9];
  var25 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return var17;
}

/**
 * Subroutine at address 0x00021CD4
 */
void sub_21CD4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = arg1;
  ((int *) sp)[10] = ra;
  ((int *) sp)[9] = s1;
  if (((arg2 < 0x00000006)) == 0x00000000)
  {
  case 3:

  label10:
    var8 = 0xFFFFFC0D;
  }
  else
  {
    var2 = arg2 << 0x00000002;
    var3 = ((int *) (var2 + 0x000431A4))[0];
    switch () {
    case 0:
      var4 = ((int *) arg1)[888];

    label47:
      sub_32448 (var4, 0x00000000);

    label49:
      var7 = ((int *) var1)[888];

    label50:
      var8 = 0x00000000;
      ((int *) (var2 + var7))[10] = 0x00000001;
      goto label51;
    case 1:
      var11 = ((int *) arg1)[888];
      var4 = var11 + 0x00000004;
      goto label47;
    case 2:
      var12 = sp;
      sub_32328 (var12, 0x00000000);
      var15 = ((int *) var1)[652];
      var16 = ((int *) var15)[206];
      if (var16 == 0x00000003)
      {
        var52 = ((int *) var1)[651];

      label23:
        var34 = sp + 0x00000010;
        scePaf_047C9996 (var34, var33, "tex_default_music_icon");
        var37 = ((int *) sp)[4];
        var38 = sp;
        sub_32448 (var38, var37);
        var41 = ((int *) sp)[4];
        if (var41 == 0x00000000)
        {
          var20 = ((int *) var1)[888];
        }
        else
        {
          var42 = ((int *) var41)[1];
          var43 = var42 + 0xFFFFFFFF;
          ((int *) var41)[1] = var43;
          if (var43 > 0)
          {

          label36:
            var20 = ((int *) var1)[888];
          }
          else
          {
            var44 = ((int *) var41)[0];
            var45 = ((int *) var44)[1];
            var48 var49 = (*var45) (var41);
            var20 = ((int *) var1)[888];
          }
        }
      }
      else
      {
        if (((var16 < 0x00000004)) == 0x00000000)
        {
          if (var16 != 0x00000005)
          {
            var17 = sp;

          label34:
            sub_32448 (var17, 0x00000000);
            goto label36;
          }
          else
          {
            var50 = sp;
            var51 = ((int *) var1)[651];
            goto label23;
          }
        }
        else
        {
          if (var16 == 0x00000002)
          {
            var33 = ((int *) var1)[651];
            goto label23;
          }
          else
          {
            var17 = sp;
            goto label34;
          }
        }
      }
      var21 = ((int *) sp)[0];
      sub_32448 ((var20 + 0x00000008), var21);
      var24 = ((int *) sp)[0];
      if (var24 == 0x00000000)
      {
        var7 = ((int *) var1)[888];
      }
      else
      {
        var25 = ((int *) var24)[1];
        var26 = var25 + 0xFFFFFFFF;
        ((int *) var24)[1] = var26;
        if (var26 > 0)
          goto label49;
        var27 = ((int *) var24)[0];
        var28 = ((int *) var27)[1];
        var31 var32 = (*var28) (var24);
        var7 = ((int *) var1)[888];
      }
      goto label50;
    goto label10;
    case 4:
      var53 = ((int *) arg1)[888];
      sub_3397C ((var53 + 0x0000000C), 0x00000000);
      var7 = ((int *) var1)[888];
      goto label50;
    case 5:
      var56 = ((int *) arg1)[888];
      sub_339D8 ((var56 + 0x00000010), 0x00000000);
      var7 = ((int *) var1)[888];
      goto label50;
    }
  }

label51:
  ra = ((int *) sp)[10];
  var9 = ((int *) sp)[9];
  var10 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00021E8C
 */
int sub_21E8C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if ((arg2 & 0x000000FF) != 0x00000000)
  {
    var9 = *((int *) 0x00048018);
    *((int *) 0x00048018) = (var9 + 0x00000001);
    scePaf_68CE0A83 ();
    scePaf_88A5E3CF ();
    var7 = *((int *) 0x00048018);
  }
  else
  {
    var1 = *((int *) 0x00048018);
    var2 = var1 + 0xFFFFFFFF;
    *((int *) 0x00048018) = var2;
    if (var2 < 0)
    {
      *((int *) 0x00048018) = 0x00000000;
    }
    else
    {
      scePaf_30BCB0F4 ();
      scePaf_5E770EF9 ();
    }
    var7 = *((int *) 0x00048018);
  }
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00021F04
 */
void sub_21F04 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2 & 0x000000FF;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (var1 == 0x00000000)
  {
    var3 = ((int *) arg1)[70];
    var4 = 0x00000000;
    if (!(var3 != 0x00000001))
    {

    label6:
      sub_21F88 (arg1, var4);
      var3 = ((int *) var2)[70];
    }
  }
  else
  {
    var3 = ((int *) arg1)[70];
    var4 = 0x00000001;
    if (var3 == 0x00000000)
      goto label6;
  }
  var5 = !(var1) ? (var3 + 0xFFFFFFFF) : (var3 + 0x00000001);
  ((int *) var2)[70] = var5;
  if (var5 < 0)
  {
    ((int *) var2)[70] = 0x00000000;
  }
  var6 = ((int *) var2)[70];
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00021F88
 */
void sub_21F88 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg2 & 0x000000FF;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    var12 = ((int *) arg1)[882];
    var13 = *((int *) 0x0004801C);
    var5 = ((int *) var12)[28];
    *((int *) 0x0004801C) = (var13 + 0x00000001);

  label7:
    var8 var9 = (*var5) (arg1, var1, arg3, arg4, arg5, arg6, arg7, arg8);
  }
  else
  {
    var2 = *((int *) 0x0004801C);
    var3 = var2 + 0xFFFFFFFF;
    *((int *) 0x0004801C) = var3;
    if (var3 < 0)
    {
      *((int *) 0x0004801C) = 0x00000000;
    }
    else
    {
      var4 = ((int *) arg1)[882];
      var5 = ((int *) var4)[29];
      goto label7;
    }
  }
  var10 = *((int *) 0x0004801C);
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00021FF8
 */
void sub_21FF8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = arg1;
  sub_32328 (arg1, 0x00000000);
  sub_32328 ((var1 + 0x00000004), 0x00000000);
  sub_32328 ((var1 + 0x00000008), 0x00000000);
  sub_32348 ((var1 + 0x0000000C), 0x00000000);
  sub_32368 ((var1 + 0x00000010), 0x00000000);
  ((int *) var1)[6] = arg2;
  sub_22224 (var1);
  var16 = scePaf_31AC0624 (0x00000010, 0x0007F800);
  ((int *) var1)[7] = var16;
  scePaf_6439FDBC (var16, 0x000000FF, 0x0007F800);
  var21 = scePaf_31AC0624 (0x00000010, 0x00038400);
  ((int *) var1)[8] = var21;
  scePaf_6439FDBC (var21, 0x000000FF, 0x00038400);
  var26 = scePaf_31AC0624 (0x00000010, 0x0000CD00);
  ((int *) var1)[9] = var26;
  scePaf_6439FDBC (var26, 0x000000FF, 0x0000CD00);
  ra = ((int *) sp)[2];
  var29 = ((int *) sp)[1];
  var30 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000220D8
 */
void sub_220D8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_22224 (arg1);
  var4 = ((int *) var1)[7];
  if (var4 != 0x00000000)
  {
    scePaf_22FB4177 (var4);
    ((int *) var1)[7] = 0x00000000;
  }
  var5 = ((int *) var1)[8];
  if (var5 != 0x00000000)
  {
    scePaf_22FB4177 (var5);
    ((int *) var1)[8] = 0x00000000;
  }
  var6 = ((int *) var1)[9];
  if (var6 != 0x00000000)
  {
    scePaf_22FB4177 (var6);
    ((int *) var1)[9] = 0x00000000;
  }
  var7 = ((int *) var1)[4];
  if (var7 != 0x00000000)
  {
    scePaf_65FDC4C5 (var7);
    var8 = ((int *) var1)[3];
  }
  else
  {
    var8 = ((int *) var1)[3];
  }
  if (var8 != 0x00000000)
  {
    scePaf_65FDC4C5 (var8);
    var9 = ((int *) var1)[2];
  }
  else
  {
    var9 = ((int *) var1)[2];
  }
  if (var9 == 0x00000000)
  {
    var12 = ((int *) var1)[1];
  }
  else
  {
    var10 = ((int *) var9)[1];
    var11 = var10 + 0xFFFFFFFF;
    ((int *) var9)[1] = var11;
    if (var11 <= 0)
    {
      var31 = ((int *) var9)[0];
      var32 = ((int *) var31)[1];
      var35 var36 = (*var32) (var9);
      var12 = ((int *) var1)[1];
    }
    else
    {
      var12 = ((int *) var1)[1];
    }
  }
  if (var12 == 0x00000000)
  {
    var15 = ((int *) var1)[0];
  }
  else
  {
    var13 = ((int *) var12)[1];
    var14 = var13 + 0xFFFFFFFF;
    ((int *) var12)[1] = var14;
    if (var14 <= 0)
    {
      var25 = ((int *) var12)[0];
      var26 = ((int *) var25)[1];
      var29 var30 = (*var26) (var12);
      var15 = ((int *) var1)[0];
    }
    else
    {
      var15 = ((int *) var1)[0];
    }
  }
  ra = ((int *) sp)[1];
  if (!(var15 == 0x00000000))
  {
    var16 = ((int *) var15)[1];
    var17 = var16 + 0xFFFFFFFF;
    ((int *) var15)[1] = var17;
    if (var17 <= 0)
    {
      var19 = ((int *) var15)[0];
      var20 = ((int *) var19)[1];
      var23 var24 = (*var20) (var15);
      ra = ((int *) sp)[1];
    }
    else
    {
      ra = ((int *) sp)[1];
    }
  }
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022224
 */
void sub_22224 (int arg1)
{
  ((int *) arg1)[5] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_32448 (arg1, 0x00000000);
  sub_32448 ((var1 + 0x00000004), 0x00000000);
  sub_32448 ((var1 + 0x00000008), 0x00000000);
  sub_3397C ((var1 + 0x0000000C), 0x00000000);
  sub_339D8 ((var1 + 0x00000010), 0x00000000);
  var12 = var1 + 0x00000028;
  var13 = 0x00000005;
  while (1) {
    var13 = var13 + 0xFFFFFFFF;
    ((int *) var12)[0] = 0x00000000;
    var12 = var12 + 0x00000004;
    if (var13 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022298
 */
int sub_22298 (int arg1, int arg2)
{
  var1 = arg1;
  if (((arg2 < 0x00000007)) == 0x00000000)
  {
  case 3:

  label12:
    var4 = 0x00000000;
  }
  else
  {
    var2 = ((int *) ((arg2 << 0x00000002) + 0x000431BC))[0];
    switch () {
    case 0:
      var3 = ((int *) var1)[10];

    label16:
      var4 = (0x00000000 < var3);
      goto label17;
    case 1:
      var3 = ((int *) var1)[11];
      goto label16;
    case 2:
      var3 = ((int *) var1)[12];
      goto label16;
    goto label12;
    case 4:
      var3 = ((int *) var1)[14];
      goto label16;
    case 5:
      var3 = ((int *) var1)[15];
      goto label16;
    case 6:
      var5 = ((int *) var1)[10];
      var6 = 0x00000000;
      if (!(var5 == 0x00000000))
      {
        var7 = ((int *) var1)[11];
        if (!(var7 == 0x00000000))
        {
          var8 = ((int *) var1)[12];
          if (!(var8 == 0x00000000))
          {
            var9 = ((int *) var1)[14];
            if (!(var9 == 0x00000000))
            {
              var10 = ((int *) var1)[15];
              var6 = (0x00000000 < var10);
            }
          }
        }
      }
      var4 = var6;
      goto label17;
    }
  }

label17:
  return var4;
}

/**
 * Subroutine at address 0x00022334
 */
int sub_22334 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[56] = fp;
  var1 = arg2 << 0x00000002;
  ((int *) sp)[54] = s6;
  ((int *) sp)[50] = s2;
  var2 = var1 + arg1;
  ((int *) var2)[10] = 0x00000001;
  ((int *) sp)[55] = s7;
  var3 = arg1;
  var4 = sp + 0x00000010;
  ((int *) sp)[51] = s3;
  var5 = arg2;
  ((int *) sp)[49] = s1;
  ((int *) sp)[57] = ra;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[48] = s0;
  sub_32328 (var4, 0x00000000);
  ((int *) sp)[12] = 0x00000000;
  var8 = ((int *) var2)[7];
  ((int *) sp)[45] = 0x00000000;
  ((int *) sp)[47] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  ((int *) sp)[44] = 0x00000000;
  if (var8 == 0x00000000)
  {
    var181 = sp + 0x00000010;
    sub_32448 (var181, 0x00000000);
    ((int *) sp)[45] = 0xFFFFFC0A;
    ((int *) var2)[10] = 0x00000000;

  label137:
  }
  else
  {
    var9 = sp + 0x00000040;
    ((int *) sp)[16] = 0x00000000;
    ((int *) sp)[17] = 0x00000000;
    sub_31940 (var9, arg3);
    var12 = sp + 0x000000B0;
    var15 = sub_22A04 (var9, var12);
    ((int *) sp)[46] = var15;
    sub_317D8 (var9);
    var18 = ((int *) sp)[46];
    var19 = ((int *) sp)[44];
    if (var18 == 0x00000000)
    {
      var178 = sp + 0x00000010;
      sub_32448 (var178, 0x00000000);
      ((int *) sp)[45] = 0xFFFFFC0C;
      ((int *) var2)[10] = 0x00000000;

    label132:
      var80 = ((int *) sp)[46];
    }
    else
    {
      var20 = ((int *) sp)[46];
      var23 = scePaf_46B03301 (var20, var19, 0x00000000, 0x00000001);
      var24 = var23;
      if (var5 == 0x00000002)
      {
        ((int *) sp)[47] = var23;
        var177 = scePaf_E487AEFA (var23);
        var24 = var177;
      }
      if (var24 == 0x00000000)
      {
        var172 = sp + 0x00000010;
        sub_32448 (var172, 0x00000000);
        ((int *) sp)[45] = 0xFFFFFC0A;
        ((int *) var2)[10] = 0x00000000;
      }
      else
      {
        var25 = ((int *) var24)[11];
        var26 = var24 + 0x0000002C;
        ((int *) sp)[24] = var25;
        var27 = ((int *) var26)[1];
        ((int *) sp)[8] = var25;
        ((int *) sp)[9] = var27;
        ((int *) sp)[25] = var27;
        ((int *) sp)[20] = var25;
        ((int *) sp)[21] = var27;
        var30 var31 = scePaf_0A6D0925 (var24, 0x00000001);
        var32 = ((int *) var26)[14];
        var33 = ((int *) sp)[8];
        var34 = ((int *) sp)[9];
        ((int *) sp)[13] = var31;
        ((int *) sp)[29] = var31;
        ((int *) sp)[12] = var30;
        ((int *) sp)[28] = var30;
        var35 = ((unsigned short *) var26)[36];
        var38 = scePaf_0D5BAC93 (var33, var34, var32, 0x00000002);
        var39 = var38;
        if (var5 == 0x00000001)
        {
          if (((0x00038400 < var38)) != 0x00000000)
          {
            var171 = ((int *) sp)[13];

          label38:
            var168 = sp + 0x00000010;
            sub_32448 (var168, 0x00000000);
            ((int *) sp)[45] = 0xFFFFFC0B;
            ((int *) var3)[11] = 0x00000000;
          }
          else
          {
            var166 = ((int *) sp)[13];
            if (((0x00038400 < var166)) == 0x00000000)
            {
              var40 = ((int *) sp)[12];

            label61:
              var41 = sp + 0x00000010;
              if (var40 == 0x00000000)
              {
                sub_32448 (var41, 0x00000000);
                ((int *) sp)[45] = 0xFFFFFC0A;
                ((int *) (var1 + var3))[10] = 0x00000000;
              }
              else
              {
                var42 = var1 + var3;
                var43 = ((int *) var42)[7];
                if (var43 == 0x00000000)
                {

                label84:
                  sub_32448 (var41, 0x00000000);
                  ((int *) sp)[45] = 0xFFFFFC0A;
                  ((int *) var42)[10] = 0x00000000;
                }
                else
                {
                  var46 = scePaf_64A8F0B9 (0x00000068);
                  var47 = var24 + 0x00000004;
                  var48 = ((int *) var47)[2];
                  var49 = var46;
                  var50 = ((int *) var26)[14];
                  ((int *) sp)[36] = var48;
                  var51 = ((int *) var47)[3];
                  ((int *) sp)[0] = 0x00000000;
                  var52 = ((int *) sp)[9];
                  var53 = ((int *) var42)[7];
                  var54 = ((int *) sp)[8];
                  ((int *) sp)[32] = var48;
                  ((int *) sp)[37] = var51;
                  ((int *) sp)[33] = var51;
                  scePaf_EADEB5FC (var49, var54, var52, var50, 0x00000002, 0x00000000, var51, var53);
                  var57 = sp + 0x00000010;
                  sub_32448 (var57, var49);
                  var60 = ((int *) sp)[4];
                  if (var60 == 0x00000000)
                  {

                  label83:
                    var41 = sp + 0x00000010;
                    goto label84;
                  }
                  else
                  {
                    var61 = ((int *) sp)[8];
                    var62 = ((int *) var26)[15];
                    var65 = scePaf_336E37F3 (var60, var61);
                    if (var35 == 0x00000000)
                    {
                      __asm__ ("break      0x00007;");
                    }
                    var66 = ((int *) sp)[12];
                    scePaf_6D03433C (var60, 0x00000000, var66, var62, ((((var65 + var35) + 0xFFFFFFFF) / var35) * var35));
                    var69 = ((int *) var26)[14];
                    if ((((var69 + 0xFFFFFFFC) < 0x00000004)) != 0x00000000)
                    {
                      var108 var109 = scePaf_7DF2134C (var24, 0x00000001);
                      ((int *) sp)[29] = var109;
                      ((int *) sp)[28] = var108;
                      if (var108 == 0x00000000)
                        goto label83;
                      var110 = sp + 0x000000A0;
                      sub_32428 (var110, 0x00000000);
                      var113 = ((int *) var24)[31];
                      if (var113 < 0)
                      {

                      label104:
                        var114 = ((int *) sp)[40];
                      }
                      else
                      {
                        if (((var113 < 0x00000003)) != 0x00000000)
                        {
                          var146 = scePaf_5C068AD6 (0x00000024);
                          var147 = ((int *) sp)[29];
                          var148 = ((int *) var24)[31];
                          var149 = ((int *) var3)[6];
                          var139 = var146;

                        label99:
                          scePaf_96383E99 (var139, var138, var137, (var136 >> 0x00000002));
                          sub_324C0 (var110, var139);
                          var114 = ((int *) sp)[40];
                        }
                        else
                        {
                          if (!(var113 == 0x00000003))
                            goto label104;
                          var135 = scePaf_5C068AD6 (0x00000024);
                          var136 = ((int *) sp)[29];
                          var137 = ((int *) var24)[31];
                          var138 = ((int *) var3)[6];
                          var139 = var135;
                          goto label99;
                        }
                      }
                      if (var114 == 0x00000000)
                      {
                        var130 = sp + 0x00000010;
                        sub_32448 (var130, 0x00000000);
                        var121 = ((int *) sp)[40];
                        ((int *) (var1 + var3))[10] = 0x00000000;
                        ((int *) sp)[45] = 0xFFFFFC0A;
                      }
                      else
                      {
                        var115 = ((int *) sp)[28];
                        scePaf_A151DD55 (var114, var115);
                        var118 = ((int *) sp)[4];
                        scePaf_D59E54BC (var118, var110);
                        var121 = ((int *) sp)[40];
                      }
                      if (!(var121 == 0x00000000))
                      {
                        var122 = ((int *) var121)[1];
                        var123 = var122 + 0xFFFFFFFF;
                        ((int *) var121)[1] = var123;
                        if (!(var123 > 0))
                        {
                          var124 = ((int *) var121)[0];
                          var125 = ((int *) var124)[1];
                          var128 var129 = (*var125) (var121);
                        }
                      }
                    }
                  }
                }
              }
            }
            else
            {
              var167 = ((int *) sp)[12];
              goto label38;
            }
          }
        }
        else
        {
          if (((var5 < 0x00000002)) != 0x00000000)
          {
            var40 = ((int *) sp)[12];
            if (var5 != 0x00000000)
              goto label61;
            if (((0x0007F800 < var39)) != 0x00000000)
            {
              var165 = ((int *) sp)[13];

            label48:
              var162 = sp + 0x00000010;
              sub_32448 (var162, 0x00000000);
              ((int *) sp)[45] = 0xFFFFFC0B;
              ((int *) var3)[10] = 0x00000000;
            }
            else
            {
              var160 = ((int *) sp)[13];
              if (((0x0007F800 < var160)) == 0x00000000)
              {
                var40 = ((int *) sp)[12];
                goto label61;
              }
              else
              {
                var161 = ((int *) sp)[12];
                goto label48;
              }
            }
          }
          else
          {
            if (var5 == 0x00000002)
            {
              if (((0x0000CD00 < var39)) != 0x00000000)
              {
                var159 = ((int *) sp)[13];

              label57:
                var156 = sp + 0x00000010;
                sub_32448 (var156, 0x00000000);
                ((int *) sp)[45] = 0xFFFFFC0B;
                ((int *) var3)[12] = 0x00000000;
              }
              else
              {
                var154 = ((int *) sp)[13];
                if (((0x0000CD00 < var154)) == 0x00000000)
                {
                  var40 = ((int *) sp)[12];
                  goto label61;
                }
                else
                {
                  var155 = ((int *) sp)[12];
                  goto label57;
                }
              }
            }
            else
            {
              var40 = ((int *) sp)[12];
              goto label61;
            }
          }
        }
      }
      var70 = ((int *) sp)[47];
      if (!(var24 == 0x00000000))
      {
        scePaf_94E322DD (var24);
        scePaf_4508F2FA (var24);
        var70 = ((int *) sp)[47];
      }
      if (var70 == 0x00000000)
      {
        var80 = ((int *) sp)[46];
      }
      else
      {
        scePaf_94E322DD (var70);
        var77 = ((int *) sp)[47];
        scePaf_4508F2FA (var77);
        goto label132;
      }
    }
    if (var80 == 0x00000000)
    {
    }
    else
    {
      scePaf_22FB4177 (var80);
      goto label137;
    }
  }
  if (var5 == 0x00000001)
  {
    var83 = ((int *) sp)[4];
    var103 = var3 + 0x00000004;

  label148:
    sub_32448 (var103, var83);
    var84 = ((int *) sp)[4];
  }
  else
  {
    if (((var5 < 0x00000002)) != 0x00000000)
    {
      if (var5 != 0x00000000)
      {
        var84 = ((int *) sp)[4];
      }
      else
      {
        var83 = ((int *) sp)[4];
        var103 = var3;
        goto label148;
      }
    }
    else
    {
      var83 = ((int *) sp)[4];
      if (var5 == 0x00000002)
      {
        var103 = var3 + 0x00000008;
        goto label148;
      }
      else
      {
        var84 = ((int *) sp)[4];
      }
    }
  }
  var85 = ((int *) sp)[45];
  if (!(var84 == 0x00000000))
  {
    var86 = ((int *) var84)[1];
    var87 = var86 + 0xFFFFFFFF;
    ((int *) var84)[1] = var87;
    if (var87 <= 0)
    {
      var97 = ((int *) var84)[0];
      var98 = ((int *) var97)[1];
      var101 var102 = (*var98) (var84, var83);
      var85 = ((int *) sp)[45];
    }
    else
    {
      var85 = ((int *) sp)[45];
    }
  }
  ra = ((int *) sp)[57];
  var88 = ((int *) sp)[56];
  var89 = ((int *) sp)[55];
  var90 = ((int *) sp)[54];
  var91 = ((int *) sp)[53];
  var92 = ((int *) sp)[52];
  var93 = ((int *) sp)[51];
  var94 = ((int *) sp)[50];
  var95 = ((int *) sp)[49];
  var96 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return var85;
}

/**
 * Subroutine at address 0x000228B4
 */
int sub_228B4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  if (arg2 == 0x00000004)
  {
    ((int *) arg1)[14] = 0x00000001;
    var21 = scePaf_48BB05D5 (0x00000014);
    var22 = var21;
    var23 = ((int *) var1)[0];
    ((int *) var22)[0] = 0x00000008;
    ((int *) var22)[1] = 0x00000000;
    ((int *) var22)[2] = 0x00000000;
    ((int *) var22)[3] = 0x00000000;
    ((int *) var22)[4] = 0x00000000;
    var26 = scePaf_17EAEC8C (var23, 0x00000000, 0x00000000, (var22 + 0x00000010), 0x00000000);
    ((int *) var22)[2] = var26;
    if (!(var26 != 0x00000000))
    {
      ((int *) var22)[3] = 0x00000000;
      ((int *) var22)[4] = 0x00000000;
    }
    sub_3397C ((var2 + 0x0000000C), var22);
    var29 = ((int *) var2)[3];
    if (var29 != 0x00000000)
    {
      var14 = 0x00000000;
    }
    else
    {
      var14 = 0xFFFFFC0A;
      ((int *) var2)[14] = 0x00000000;
    }
  }
  else
  {
    if (arg2 != 0x00000005)
    {
      var14 = 0xFFFFFC0D;
    }
    else
    {
      ((int *) arg1)[15] = 0x00000001;
      var5 = scePaf_48BB05D5 (0x00000014);
      var6 = var5;
      var7 = ((int *) var1)[0];
      ((int *) var6)[0] = 0x00045468;
      ((int *) var6)[1] = 0x00000000;
      ((int *) var6)[2] = 0x00000000;
      ((int *) var6)[3] = 0x00000000;
      ((int *) var6)[4] = 0x00000000;
      var10 = scePaf_17EAEC8C (var7, 0x00000000, 0x00000000, (var6 + 0x00000010), 0x00000000);
      ((int *) var6)[2] = var10;
      if (!(var10 != 0x00000000))
      {
        ((int *) var6)[3] = 0x00000000;
        ((int *) var6)[4] = 0x00000000;
      }
      sub_339D8 ((var2 + 0x00000010), var6);
      var13 = ((int *) var2)[4];
      var14 = 0xFFFFFC0A;
      if (var13 == 0x00000000)
      {
        ((int *) var2)[15] = 0x00000000;
      }
      else
      {
        var14 = 0x00000000;
      }
    }
  }
  ra = ((int *) sp)[4];
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var14;
}

/**
 * Subroutine at address 0x00022A04
 */
int sub_22A04 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[26] = s2;
  ((int *) sp)[24] = s0;
  ((int *) sp)[27] = ra;
  ((int *) sp)[25] = s1;
  ((int *) arg2)[0] = 0x00000000;
  var1 = sp;
  var2 = ((int *) arg1)[0];
  var5 = IoFileMgrForUser_ACE946E8 (var2, var1);
  var6 = 0x00000000;
  if (!(var5 != 0x00000000))
  {
    var7 = ((int *) sp)[2];
    var10 = scePaf_6CEA048C (var7);
    var11 = var10;
    var6 = 0x00000000;
    if (!(var11 == 0x00000000))
    {
      var12 = ((int *) arg1)[0];
      var15 = IoFileMgrForUser_109F50BC (var12, 0x00000001, 0x000001FF);
      if (var15 < 0)
      {

      label14:
        scePaf_22FB4177 (var11);
        var6 = 0x00000000;
      }
      else
      {
        var16 = ((int *) sp)[2];
        var19 = IoFileMgrForUser_6A638D83 (var15, var11, var16);
        var20 = ((int *) sp)[2];
        if (var19 != var20)
          goto label14;
        IoFileMgrForUser_810C4BC3 (var15);
        var23 = ((int *) sp)[2];
        var6 = var11;
        ((int *) arg2)[0] = var23;
      }
    }
  }
  ra = ((int *) sp)[27];
  var24 = ((int *) sp)[26];
  var25 = ((int *) sp)[25];
  var26 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return var6;
}

/**
 * Subroutine at address 0x00022AC4
 */
void sub_22AC4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) var1)[357];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) var1)[883];
    var5 = ((int *) var4)[4];
    var8 var9 = (*var5) (0x0000000D, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    __asm__ ("mtc1       $zr, $fpr14;");
    var10 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr13;"
      : 
      : "=r"(0x43480000));
    var11 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var12 = ((int *) var1)[652];
    scePaf_6719522B (var12);
    var15 = ((int *) var1)[653];
    __asm__ ("mtc1       $zr, $fpr13;");
    var16 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var15 != 0x00000000)
    {
      vsh_4E385061 (var15);
    }
    var19 = sceVshCommonGui_414454B7 ();
    if (var19 == 0x00000000)
    {
      var22 = ((int *) var1)[652];

    label20:
      var23 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42A00000));
      var24 = ((int *) var22)[206];
      var25 = ((int *) var22)[216];
      var26 = ((int *) (var25 + (var24 << 0x00000002)))[0];
      scePaf_156FBB30 (var26);
      ra = ((int *) sp)[1];
    }
    else
    {
      var20 = ((unsigned char *) var1)[275];
      var21 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      if (var20 != 0x00000000)
      {
        sceVshCommonGui_B298063A ();
        ra = ((int *) sp)[1];
      }
      else
      {
        var22 = ((int *) var1)[652];
        goto label20;
      }
    }
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022BA4
 */
void sub_22BA4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((unsigned char *) arg1)[357];
  if (var1 != 0x00000000)
  {
    var3 = ((int *) arg1)[885];
    var6 = sub_1F7A4 (arg1, var3);
    if ((var6 & 0x000000FF) != 0x00000000)
    {

    label9:
      ra = ((int *) sp)[1];
    }
    else
    {
      sub_1F744 (arg1);
      ra = ((int *) sp)[1];
    }
  }
  else
  goto label9;
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022BF0
 */
void sub_22BF0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((unsigned char *) arg1)[357];
  if (var1 != 0x00000000)
  {
    var2 = ((int *) arg1)[886];
    var5 = sub_1F7A4 (arg1, var2);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022C20
 */
void sub_22C20 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) var1)[357];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) var1)[883];
    var5 = ((int *) var4)[4];
    var8 var9 = (*var5) (0x0000000F, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    var10 = ((int *) var1)[653];
    __asm__ ("mtc1       $zr, $fpr13;");
    var11 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var10 != 0x00000000)
    {
      vsh_18A36911 (var10);
    }
    var14 = sceVshCommonGui_414454B7 ();
    if (var14 == 0x00000000)
    {
      var18 = ((int *) var1)[652];

    label18:
      var19 = 0x41200000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x41200000));
      var20 = ((int *) var18)[206];
      var21 = ((int *) var18)[216];
      var22 = ((int *) (var21 + (var20 << 0x00000002)))[0];
      scePaf_676BAC3B (var22);
      ra = ((int *) sp)[1];
    }
    else
    {
      var15 = ((unsigned char *) var1)[275];
      var16 = 0x3ECCCCCD;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3ECCCCCD));
      var17 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr13;"
        : 
        : "=r"(0x42C80000));
      if (var15 != 0x00000000)
      {
        sceVshCommonGui_82938BF0 ();
        ra = ((int *) sp)[1];
      }
      else
      {
        var18 = ((int *) var1)[652];
        goto label18;
      }
    }
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022CF0
 */
void sub_22CF0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = ((unsigned char *) arg1)[357];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label33:
    ra = ((int *) sp)[3];
  }
  else
  {
    var3 = ((int *) arg1)[893];
    var4 = ((int *) var3)[110];
    if (var4 == 0x00000000)
    {
      var42 = ((int *) var2)[652];
      var43 = ((int *) var42)[0];
      var44 = ((int *) var43)[47];
      var47 var48 = (*var44) (var42, 0x00000000, 0x00000000, arg4, arg5, arg6, arg7, arg8);
      ra = ((int *) sp)[3];
    }
    else
    {
      var7 = scePaf_D7AF5E55 (var3, "page_content_info_fg");
      if (var4 == var7)
      {
        var38 = ((int *) var2)[893];
        var41 = scePaf_D7AF5E55 (var38, "page_topmenu");
        var4 = var41;
      }
      var8 = ((int *) var2)[893];
      scePaf_2CFAF8C4 (var8, var4);
      var11 = ((int *) var2)[893];
      var14 = scePaf_D7AF5E55 (var11, "page_topmenu");
      if (var4 == var14)
      {
        var31 = ((int *) var2)[652];
        var32 = ((int *) var31)[0];
        var33 = ((int *) var32)[47];
        var36 var37 = (*var33) (var31, 0x00000000, 0x00000000);
      }
      var17 = sceVshCommonGui_414454B7 ();
      if (var17 == 0x00000000)
      {
        var19 = ((int *) var2)[883];

      label31:
        var20 = ((int *) var19)[4];
        var23 var24 = (*var20) (0x00000000);
        goto label33;
      }
      else
      {
        var18 = ((unsigned char *) var2)[275];
        if (var18 != 0x00000000)
        {
          var28 = 0x42C80000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42C80000));
          sceVshCommonGui_B298063A ();
          ra = ((int *) sp)[3];
        }
        else
        {
          var19 = ((int *) var2)[883];
          goto label31;
        }
      }
    }
  }
  var25 = ((int *) sp)[2];
  var26 = ((int *) sp)[1];
  var27 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022DFC
 */
void sub_22DFC (int arg1)
{
  ((int *) arg1)[3] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  var1 = arg1 + 0x00000028;
  ((int *) arg1)[4] = 0x00000000;
  var2 = 0x0000000B;
  while (1) {
    var2 = var2 + 0xFFFFFFFF;
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[2] = 0x00000000;
    var1 = var1 + 0x00000010;
    if (var2 != 0xFFFFFFFF)
      continue;
    break;
  }
  ((int *) arg1)[58] = 0x00000000;
  var3 = arg1 + 0x00000104;
  var4 = 0x0000000B;
  ((int *) arg1)[59] = 0x00000000;
  while (1) {
    var4 = var4 + 0xFFFFFFFF;
    ((int *) var3)[1] = 0x00000000;
    ((int *) var3)[2] = 0x00000000;
    var3 = var3 + 0x00000010;
    if (var4 != 0xFFFFFFFF)
      continue;
    break;
  }
  ((int *) arg1)[113] = 0x00000000;
  var5 = arg1 + 0x000001E0;
  var6 = 0x0000000B;
  ((int *) arg1)[114] = 0x00000000;
  while (1) {
    var6 = var6 + 0xFFFFFFFF;
    ((int *) var5)[1] = 0x00000000;
    ((int *) var5)[2] = 0x00000000;
    var5 = var5 + 0x00000010;
    if (var6 != 0xFFFFFFFF)
      continue;
    break;
  }
  ((int *) arg1)[168] = 0x00000000;
  var7 = arg1 + 0x000002B4;
  ((int *) arg1)[169] = 0x00000000;
  var8 = 0x0000000B;
  while (1) {
    var8 = var8 + 0xFFFFFFFF;
    ((int *) var7)[1] = 0x00000000;
    ((int *) var7)[2] = 0x00000000;
    var7 = var7 + 0x00000010;
    if (var8 != 0xFFFFFFFF)
      continue;
    break;
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022EB0
 */
void sub_22EB0 (int arg1, int arg2)
{
  __asm__ ("mtc1       $zr, $fpr0;");
  var1 = arg1 + 0x00000020;
  ((int *) arg1)[3] = arg2;
  sp = sp + 0xFFFFFFF0;
  __asm__ ("swc1       $fpr00, 32($a0);"
           "swc1       $fpr00, 12($v0);"
           "swc1       $fpr00, 4($v0);"
           "swc1       $fpr00, 8($v0);"
    : 
    : "=r"(arg1), "=r"(var1));
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  var5 = scePaf_2338483F ();
  var6 = ((int *) var5)[11];
  ((int *) var2)[0] = var6;
  scePaf_6439FDBC (0x00048E90, 0xFFFFFFFF, 0x00000034);
  scePaf_6439FDBC (0x00048EC4, 0xFFFFFFFF, 0x00000028);
  var11 = ((int *) var2)[0];
  *((int *) 0x00048EF0) = 0x00000000;
  *((int *) 0x00048EEC) = 0x00000000;
  var14 = scePaf_CA673A56 (var11, 0x00000010, 0x00018000);
  ((int *) var2)[12] = var14;
  ra = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022F60
 */
void sub_22F60 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg1)[12];
  var2 = arg1;
  if (var1 != 0x00000000)
  {
    var26 = ((int *) arg1)[0];
    scePaf_BA8EBE27 (var26, var1);
    ((int *) var2)[12] = 0x00000000;
  }
  var3 = 0x00046E0C;
  var4 = 0x00000003;
  while (1) {
    var5 = ((int *) var3)[0];
    var6 = 0x00000000;
    if (!(var5 <= 0))
    {
      var7 = 0x00000000;
      while (1) {
        var8 = ((int *) var3)[2];
        var6 = var6 + 0x00000001;
        sub_24E78 (var2, (var8 + var7));
        var11 = ((int *) var3)[2];
        sub_23410 (var2, ((var11 + var7) + 0x0000003C));
        var14 = ((int *) var3)[2];
        sub_23410 (var2, ((var14 + var7) + 0x00000020));
        var17 = ((int *) var3)[2];
        sub_23410 (var2, ((var17 + var7) + 0x00000004));
        var20 = ((int *) var3)[0];
        var7 = var7 + 0x00000058;
        if (((var6 < var20)) != 0x00000000)
          continue;
        break;
      }
    }
    var4 = var4 + 0xFFFFFFFF;
    var3 = var3 + 0x00000010;
    if (var4 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[5];
  var21 = ((int *) sp)[4];
  var22 = ((int *) sp)[3];
  var23 = ((int *) sp)[2];
  var24 = ((int *) sp)[1];
  var25 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00023040
 */
void sub_23040 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[10] = s6;
  var1 = *((int *) 0x00048EEC);
  ((int *) sp)[12] = fp;
  var2 = 0x00000002;
  ((int *) sp)[7] = s3;
  var3 = arg1;
  ((int *) sp)[5] = s1;
  var4 = 0x00000000;
  ((int *) sp)[13] = ra;
  ((int *) sp)[11] = s7;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = 0x00000000;
  if (!(var1 <= 0))
  {
    var5 = 0x00048E90;
    var6 = *((int *) 0x00048E90);
    while (1) {
      var5 = var5 + 0x00000004;
      var9 = scePaf_E3D530AE (((((var6 << 0x00000003) + var6) << 0x00000003) + "tex_cnf_update"), "tex_cnf_video");
      if (var9 == 0x00000000)
      {
        var51 = *((int *) 0x00048EEC);
        var2 = var4;
      }
      else
      {
        var10 = *((int *) 0x00048EEC);
        var4 = var4 + 0x00000001;
        if (!(((var4 < var10)) != 0x00000000))
          break;
        var6 = ((int *) var5)[0];
        continue;
      }
    }
  }
  var11 = *((int *) 0x00048EF0);
  var12 = 0x00000000;
  if (!(var11 <= 0))
  {
    var13 = 0x00048EC4;
    var14 = *((int *) 0x00048EC4);
    while (1) {
      var13 = var13 + 0x00000004;
      var17 = scePaf_E3D530AE (((((var14 << 0x00000003) + var14) << 0x00000003) + "tex_help"), "tex_browser");
      if (var17 == 0x00000000)
      {
        var50 = *((int *) 0x00048EF0);
        ((int *) sp)[0] = var12;
      }
      else
      {
        var18 = *((int *) 0x00048EF0);
        var12 = var12 + 0x00000001;
        if (!(((var12 < var18)) != 0x00000000))
          break;
        var14 = ((int *) var13)[0];
        continue;
      }
    }
  }
  var19 = ((var2 << 0x00000002) + 0x00048E90) + 0xFFFFFFF8;
  var20 = var2 + 0xFFFFFFFE;
  var21 = 0x00000000;
  while (1) {
    var21 = var21 + 0x00000001;
    if (var20 < 0)
    {

    label27:
      var20 = var20 + 0x00000001;
      var19 = var19 + 0x00000004;
      if (((var21 < 0x00000005)) != 0x00000000)
        continue;
      var23 = ((int *) sp)[0];
    }
    else
    {
      var22 = *((int *) 0x00048EEC);
      var23 = ((int *) sp)[0];
      if (((var20 < var22)) == 0x00000000)
        break;
      var24 = ((int *) var19)[0];
      sub_24D70 (var3, ((var24 * 0x00000058) + 0x000486A8));
      var27 = ((int *) var19)[0];
      sub_24ED8 (var3, ((var27 * 0x00000058) + 0x000486A8), 0x00000000, var20);
      goto label27;
    }
  }
  var30 = ((var23 << 0x00000002) + 0x00048EC4) + 0xFFFFFFF8;
  var31 = ((int *) sp)[0];
  var32 = 0x00000000;
  var33 = var31 + 0xFFFFFFFE;
  while (1) {
    var32 = var32 + 0x00000001;
    if (var33 < 0)
    {

    label36:
      var33 = var33 + 0x00000001;
      var30 = var30 + 0x00000004;
      if (((var32 < 0x00000005)) != 0x00000000)
        continue;
      ra = ((int *) sp)[13];
    }
    else
    {
      var34 = *((int *) 0x00048EF0);
      ra = ((int *) sp)[13];
      if (((var33 < var34)) == 0x00000000)
        break;
      var35 = ((int *) var30)[0];
      sub_24D70 (var3, ((var35 * 0x00000058) + 0x00048B20));
      var38 = ((int *) var30)[0];
      sub_24ED8 (var3, ((var38 * 0x00000058) + 0x00048B20), 0x00000006, var33);
      goto label36;
    }
  }
  var41 = ((int *) sp)[12];
  var42 = ((int *) sp)[11];
  var43 = ((int *) sp)[10];
  var44 = ((int *) sp)[9];
  var45 = ((int *) sp)[8];
  var46 = ((int *) sp)[7];
  var47 = ((int *) sp)[6];
  var48 = ((int *) sp)[5];
  var49 = ((int *) sp)[4];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00023288
 */
void sub_23288 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[1];
  var2 = arg1;
  if (var1 != 0x00000000)
  {

  label11:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[2];
    if (!(var3 == 0x00000000))
      goto label11;
    var7 = scePaf_2338483F ();
    var8 = ((int *) var7)[38];
    var9 = sp;
    scePaf_2E4662CC ("flash0:/vsh/resource/topmenu_icon.rco", 0x00000001, 0x00000000, var8, (var2 + 0x00000004), var9);
    var12 = ((int *) var2)[1];
    var13 = sp + 0x00000004;
    scePaf_5CE68F1F (var12, 0x00000400, (var2 + 0x00000008), var13);
    ra = ((int *) sp)[5];
  }
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00023300
 */
void sub_23300 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = ((int *) arg1)[1];
  scePaf_4799EE9E (var2);
  var5 = ((int *) var1)[2];
  scePaf_F3146F7A (var5);
  var8 = ((int *) var1)[1];
  ((int *) var1)[2] = 0x00000000;
  scePaf_FC63C8CA (var8);
  ((int *) var1)[1] = 0x00000000;
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00023340
 */
void sub_23340 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg3;
  var2 = sp + 0x00000004;
  ((int *) sp)[4] = s0;
  var3 = arg1;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s2;
  var4 = ((int *) arg1)[1];
  if (var4 != 0x00000000)
  {
    var10 = scePaf_64FF5B25 (var4, arg2, var2);
    ra = ((int *) sp)[7];
    if (!(var10 != 0x00000000))
    {
      var11 = ((int *) sp)[1];
      var14 = scePaf_56833008 (var11);
      var15 = sp;
      var16 = sp + 0x00000008;
      var17 = sp + 0x0000000C;
      if (var14 == 0x00000000)
      {

      label21:
        ra = ((int *) sp)[7];
      }
      else
      {
        var18 = ((int *) var3)[1];
        var19 = ((int *) var3)[2];
        var20 = ((int *) sp)[1];
        scePaf_74D678D4 (var18, var19, var20, var15, var16, var17);
        var23 = ((int *) var3)[0];
        var24 = ((int *) sp)[3];
        var27 = scePaf_CA673A56 (var23, 0x00000010, var24);
        ((int *) var1)[0] = var27;
        if (var27 != 0x00000000)
        {
          var31 = ((int *) sp)[2];
          var32 = ((int *) sp)[3];
          scePaf_3447707B (var27, var31, var32);
          var28 = ((int *) sp)[3];
        }
        else
        {
          var28 = ((int *) sp)[3];
        }
        ((int *) var1)[1] = var28;
        scePaf_3447707B ((var1 + 0x00000008), var14, 0x00000010);
        ra = ((int *) sp)[7];
      }
    }
  }
  else
  goto label21;
  var5 = ((int *) sp)[6];
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00023410
 */
void sub_23410 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg2;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg2)[0];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) arg1)[0];
    scePaf_BA8EBE27 (var4, var2);
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00023450
 */
void sub_23450 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = vsh_F74A0E53 ();
  if ((((var4 < 0x00000001)) | (((var4 ^ 0x00000003) < 0x00000001))) == 0x00000000)
  {
    sub_237BC (var1, var4);
    ra = ((int *) sp)[1];
  }
  else
  {
    sub_235B4 (var1);
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000234A8
 */
void sub_234A8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = arg3;
  ((int *) sp)[3] = s3;
  var2 = arg1;
  ((int *) sp)[2] = s2;
  var3 = (arg3 * 0x00000058);
  ((int *) sp)[1] = s1;
  var4 = arg2;
  ((int *) sp)[0] = s0;
  var5 = ((int *) arg2)[2];
  var6 = ((int *) arg2)[1];
  var7 = ((var1 << 0x00000003) + var1) << 0x00000003;
  sub_23340 (arg1, (var6 + var7), ((var5 + var3) + 0x00000004));
  var10 = ((int *) var4)[1];
  var11 = ((int *) var4)[2];
  sub_23340 (var2, ((var10 + var7) + 0x00000018), ((var11 + var3) + 0x00000020));
  var14 = ((int *) var4)[1];
  var15 = ((int *) var4)[2];
  sub_23340 (var2, ((var14 + var7) + 0x00000030), ((var15 + var3) + 0x0000003C));
  var18 = ((int *) var4)[3];
  if (var18 == 0x00000000)
  {
    var23 = ((int *) var4)[2];
    sub_24D70 (var2, (var23 + var3));
    var26 = ((int *) var4)[2];
    sub_23410 (var2, ((var26 + var3) + 0x0000003C));
    var29 = ((int *) var4)[2];
    sub_23410 (var2, ((var29 + var3) + 0x00000020));
    var32 = ((int *) var4)[2];
    sub_23410 (var2, ((var32 + var3) + 0x00000004));
    ra = ((int *) sp)[4];
  }
  else
  {
    ra = ((int *) sp)[4];
  }
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000235B4
 */
void sub_235B4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg1;
  ((int *) sp)[2] = s2;
  var2 = 0x00000003;
  ((int *) sp)[1] = s1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  sub_23288 (arg1);
  var5 = 0x00046E0C;
  while (1) {
    var6 = ((int *) var5)[0];
    var7 = 0x00000000;
    if (!(var6 <= 0))
    {
      var8 = 0x00000000;
      while (1) {
        sub_234A8 (var1, var5, var8);
        var11 = ((int *) var5)[0];
        var7 = var7 + 0x00000001;
        var8 = var7;
        if (((var7 < var11)) != 0x00000000)
          continue;
        break;
      }
    }
    var2 = var2 + 0xFFFFFFFF;
    var5 = var5 + 0x00000010;
    if (var2 >= 0)
      continue;
    break;
  }
  sub_23300 (var1);
  var14 = 0x00048EF4;
  var15 = 0x00000007;
  while (1) {
    var15 = var15 + 0xFFFFFFFF;
    ((int *) var14)[0] = 0x00000000;
    var14 = var14 + 0x00000004;
    if (var15 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[4];
  var16 = ((int *) sp)[3];
  var17 = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002365C
 */
int sub_2365C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  ((int *) sp)[13] = s1;
  var2 = arg3;
  ((int *) sp)[12] = s0;
  ((int *) sp)[15] = ra;
  scePaf_6439FDBC ((arg3 + 0x00000008), 0x00000000, 0x00000010);
  var5 = sp + 0x00000024;
  var6 = sp + 0x00000020;
  var9 = sub_25534 (arg2, var6, var5);
  var10 = 0xFFFFFFFF;
  if (var9 < 0)
  {

  label34:
    ra = ((int *) sp)[15];
  }
  else
  {
    var11 = ((int *) sp)[9];
    var12 = ((int *) sp)[8];
    if (var11 == 0xFFFFFFFF)
      goto label34;
    var13 = sp;
    var16 = vsh_B8FE68B2 (var12, var11, var13);
    var17 = ((int *) sp)[8];
    if (var16 < 0)
    {
      if (var17 == 0x00000003)
      {
        var45 = ((int *) sp)[9];
        ((int *) sp)[9] = (var45 & 0x00000001);
      }
      else
      {
        var39 = ((int *) sp)[9];
        ((int *) sp)[9] = 0x00000000;
      }
      var40 = ((int *) sp)[9];
      var41 = sp;
      var44 = vsh_B8FE68B2 (var17, var40, var41);
      var10 = 0xFFFFFFFF;
      if (var44 >= 0)
      {

      label19:
        var18 = ((unsigned short *) sp)[2];
        var10 = 0xFFFFFFFF;
        if (!((var18 & 0x0000FFFF) != 0x00000005))
        {
          var19 = ((unsigned short *) sp)[3];
          var20 = ((int *) sp)[2];
          if (!(var19 == 0x00000000))
          {
            ((short *) var2)[4] = var18;
            ((int *) var2)[1] = var20;
            if (var19 == 0x00000001)
            {
              ((short *) var2)[5] = 0x00000002;
            }
            else
            {
              if (var19 == 0x00000002)
              {
                ((short *) var2)[5] = 0x00000001;
              }
            }
            var21 = ((int *) sp)[3];
            var22 = ((int *) sp)[2];
            var23 = ((int *) var1)[0];
            ((int *) var2)[5] = var21;
            var26 = scePaf_CA673A56 (var23, 0x00000010, var22);
            ((int *) var2)[0] = var26;
            var10 = 0xFFFFFFFF;
            if (!(var26 == 0x00000000))
            {
              var27 = ((int *) sp)[8];
              var28 = ((int *) sp)[9];
              var31 = vsh_C6387EF9 (var27, var28, var26, 0x00000001);
              var10 = 0x00000000;
              if (var31 < 0)
              {
                var35 = ((int *) var1)[0];
                var36 = ((int *) var2)[0];
                scePaf_BA8EBE27 (var35, var36);
                ((int *) var2)[0] = 0x00000000;
                var10 = 0xFFFFFFFF;
              }
            }
          }
        }
        goto label34;
      }
      else
      {
        ra = ((int *) sp)[15];
      }
    }
    else
    goto label19;
  }
  var32 = ((int *) sp)[14];
  var33 = ((int *) sp)[13];
  var34 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var10;
}

/**
 * Subroutine at address 0x000237BC
 */
void sub_237BC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[36] = s4;
  var1 = arg1;
  ((int *) sp)[32] = s0;
  var2 = arg2;
  ((int *) sp)[39] = ra;
  ((int *) sp)[38] = s6;
  ((int *) sp)[37] = s5;
  ((int *) sp)[35] = s3;
  ((int *) sp)[34] = s2;
  ((int *) sp)[33] = s1;
  sub_23288 (arg1);
  if (var2 == 0x00000001)
  {

  label9:
    var98 = sp;
    scePaf_15AFC8D3 (var98, 0x00000080, 0x00039A24, "flash1:/vsh/theme/custom_theme.dat");
    var5 = sp;
  }
  else
  {
    if (var2 == 0x00000002)
    {
      goto label9;
    }
    else
    {
      var5 = sp;
    }
  }
  var8 = vsh_4B420C67 (var5, 0x00000000);
  if (var8 < 0)
  {
    vsh_6E3282C1 ();
    sub_23300 (var1);
  }
  var11 = vsh_FACD4E39 (0x00000002);
  if (var11 != 0x00000000)
  {
    var88 = *((int *) 0x00046E0C);
    var89 = 0x00000000;
    if (!(var88 <= 0))
    {
      var90 = 0x00048EF4;
      while (1) {
        sub_234A8 (var1, 0x00046E0C, var89);
        ((int *) var90)[0] = 0x00000000;
        var89 = var89 + 0x00000001;
        var93 = *((int *) 0x00046E0C);
        var90 = var90 + 0x00000004;
        if (((var89 < var93)) != 0x00000000)
          continue;
        break;
      }
    }
  }
  else
  {
    var12 = *((int *) 0x00046E0C);
    var13 = 0x00000000;
    if (!(var12 <= 0))
    {
      var14 = 0x00048EF4;
      var15 = 0x00000000;
      var16 = 0x00000000;
      while (1) {
        var17 = *((int *) 0x00046E14);
        var18 = *((int *) 0x00046E10);
        var21 = sub_2365C (var1, (var18 + var16), ((var17 + var15) + 0x00000004));
        var22 = var1;
        if (var21 < 0)
        {
          sub_234A8 (var22, 0x00046E0C, var13);
          ((int *) var14)[0] = 0x00000000;
        }
        else
        {
          var23 = *((int *) 0x00046E14);
          sub_24D70 (var22, (var23 + var15));
          var26 = *((int *) 0x00046E14);
          sub_23410 (var1, ((var26 + var15) + 0x00000004));
          ((int *) var14)[0] = 0x00000001;
        }
        var29 = *((int *) 0x00046E0C);
        var13 = var13 + 0x00000001;
        var16 = var16 + 0x00000048;
        var15 = var15 + 0x00000058;
        var14 = var14 + 0x00000004;
        if (((var13 < var29)) != 0x00000000)
          continue;
        break;
      }
    }
  }
  vsh_288E498D (0x00000002);
  var34 = vsh_FACD4E39 (0x00000003);
  if (var34 != 0x00000000)
  {
    var78 = 0x00046E1C;
    var79 = 0x00000001;
    while (1) {
      var80 = ((int *) var78)[0];
      var81 = 0x00000000;
      if (!(var80 <= 0))
      {
        var82 = 0x00000000;
        while (1) {
          sub_234A8 (var1, var78, var82);
          var85 = ((int *) var78)[0];
          var81 = var81 + 0x00000001;
          var82 = var81;
          if (((var81 < var85)) != 0x00000000)
            continue;
          break;
        }
      }
      var79 = var79 + 0x00000001;
      var78 = var78 + 0x00000010;
      if (((var79 < 0x00000004)) != 0x00000000)
        continue;
      break;
    }
  }
  else
  {
    var35 = 0x00046E1C;
    var36 = 0x00000001;
    while (1) {
      var37 = ((int *) var35)[0];
      var38 = 0x00000000;
      if (!(var37 <= 0))
      {
        var39 = 0x00000000;
        var40 = 0x00000000;
        while (1) {
          var41 = ((int *) var35)[2];
          var42 = ((int *) var35)[1];
          var45 = sub_2365C (var1, (var42 + var40), ((var41 + var39) + 0x00000004));
          var46 = ((int *) var35)[1];
          var47 = ((int *) var35)[2];
          var50 = sub_2365C (var1, ((var46 + var40) + 0x00000030), ((var47 + var39) + 0x0000003C));
          var51 = var1;
          if ((var50 | var45) < 0)
          {
            sub_234A8 (var51, var35, var38);
            var53 = ((int *) var35)[0];
          }
          else
          {
            var52 = ((int *) var35)[3];
            if (var52 == 0x00000000)
            {
              var67 = ((int *) var35)[2];
              sub_24D70 (var51, (var67 + var39));
              var70 = ((int *) var35)[2];
              sub_23410 (var1, ((var70 + var39) + 0x0000003C));
              var73 = ((int *) var35)[2];
              sub_23410 (var1, ((var73 + var39) + 0x00000004));
              var53 = ((int *) var35)[0];
            }
            else
            {
              var53 = ((int *) var35)[0];
            }
          }
          var38 = var38 + 0x00000001;
          var40 = var40 + 0x00000048;
          var39 = var39 + 0x00000058;
          if (((var38 < var53)) != 0x00000000)
            continue;
          break;
        }
      }
      var36 = var36 + 0x00000001;
      var35 = var35 + 0x00000010;
      if (((var36 < 0x00000004)) != 0x00000000)
        continue;
      break;
    }
  }
  vsh_288E498D (0x00000003);
  vsh_6E3282C1 ();
  sub_23300 (var1);
  ra = ((int *) sp)[39];
  var60 = ((int *) sp)[38];
  var61 = ((int *) sp)[37];
  var62 = ((int *) sp)[36];
  var63 = ((int *) sp)[35];
  var64 = ((int *) sp)[34];
  var65 = ((int *) sp)[33];
  var66 = ((int *) sp)[32];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x00023AF4
 */
void sub_23AF4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg3)[6];
  if (var2 != 0x00000000)
  {
    sub_32408 (arg1, (arg3 + 0x00000018));
  }
  else
  {
    sub_32328 (arg1, 0x00000000);
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00023B40
 */
void sub_23B40 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp + 0x00000008;
  ((int *) sp)[4] = s0;
  var2 = sp;
  var3 = arg1;
  ((int *) sp)[6] = ra;
  var4 = sp + 0x00000004;
  var7 = sub_253EC (arg3, var2, var4, var1);
  var8 = ((int *) sp)[0];
  if (var8 < 0)
  {
    sub_32328 (var3, 0x00000000);
  }
  else
  {
    var9 = ((int *) sp)[2];
    var10 = ((int *) sp)[1];
    var11 = ((int *) ((var8 << 0x00000004) + 0x00046E0C))[2];
    sub_23AF4 (var3, arg2, ((((var10 * 0x00000058) + (((var9 << 0x00000003) - var9) << 0x00000002)) + var11) + 0x00000004));
  }
  ra = ((int *) sp)[6];
  var14 = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00023BF0
 */
void sub_23BF0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_22FB4177 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00023C0C
 */
void sub_23C0C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[42] = s6;
  var1 = arg2;
  ((int *) sp)[41] = s5;
  var2 = arg1;
  var3 = sp;
  ((int *) sp)[39] = s3;
  var4 = arg3;
  ((int *) sp)[44] = ra;
  ((int *) sp)[43] = s7;
  ((int *) sp)[40] = s4;
  ((int *) sp)[38] = s2;
  ((int *) sp)[37] = s1;
  ((int *) sp)[36] = s0;
  var5 = ((int *) arg3)[0];
  var6 = ((int *) arg3)[1];
  sub_32328 (var3, 0x00000000);
  if (var5 == 0x00000000)
  {
    sub_32328 (var2, 0x00000000);
    var16 = ((int *) sp)[0];
  }
  else
  {
    var9 = ((unsigned short *) var4)[5];
    ((int *) sp)[4] = 0x00000000;
    var10 = var5;
    ((int *) sp)[5] = 0x00000000;
    if (((((var9 + 0xFFFFFFFF) & 0x0000FFFF) < 0x00000002)) != 0x00000000)
    {
      var154 = LWL (var4, s1, 0x00000017);
      var155 = LWR (var4, var154, 0x00000014);
      var158 = scePaf_31AC0624 (0x00000010, var155);
      var10 = var158;
      if (var158 == 0x00000000)
      {

      label111:
        var12 = var2;

      label112:
        sub_32328 (var12, 0x00000000);

      label114:
        var15 = ((int *) sp)[4];
      }
      else
      {
        var159 = ((unsigned short *) var4)[5];
        ((int *) sp)[4] = 0x00023BF0;
        ((int *) sp)[5] = var10;
        if (var159 == 0x00000002)
        {
          var162 = scePaf_BFEF859E (var10, var155, var5, 0x00000000);
        }
        else
        {
          var162 = scePaf_D6E29A9E (var10, var155, var5, var6);
        }
        if (var162 >= 0)
        {

        label20:
          var11 = ((unsigned short *) var4)[4];
          if (var11 < 0)
            goto label111;
          if (((var11 < 0x00000005)) != 0x00000000)
          {
            goto label111;
          }
          else
          {
            if (!(var11 == 0x00000005))
              goto label111;
            var40 = scePaf_07A14F5B (var10, var6);
            var41 = ((int *) var40)[11];
            var42 = var40 + 0x0000002C;
            ((int *) sp)[12] = var41;
            var43 = var40;
            var44 = ((int *) var42)[1];
            ((int *) sp)[8] = var41;
            ((int *) sp)[9] = var44;
            ((int *) sp)[13] = var44;
            var47 var48 = scePaf_0A6D0925 (var40, 0x00000001);
            ((int *) sp)[17] = var48;
            ((int *) sp)[16] = var47;
            var49 = ((unsigned short *) var42)[36];
            var52 = scePaf_64A8F0B9 (0x00000068);
            var53 = var43 + 0x00000004;
            var54 = ((int *) var53)[2];
            var55 = var52;
            var56 = ((int *) var42)[14];
            ((int *) sp)[24] = var54;
            var57 = ((int *) var53)[3];
            var58 = ((int *) sp)[8];
            var59 = ((int *) sp)[9];
            var60 = ((int *) var1)[0];
            ((int *) sp)[20] = var54;
            ((int *) sp)[25] = var57;
            ((int *) sp)[21] = var57;
            scePaf_A0E3AAE0 (var55, var60, var58, var59, var56, 0x00000002, 0x00000000, var57);
            var63 = sp;
            sub_32448 (var63, var55);
            var66 = ((int *) sp)[0];
            var67 = ((int *) var66)[18];
            var68 = ((int *) sp)[8];
            if (var67 != 0x00000000)
            {

            label37:
              var74 = ((int *) var42)[15];
              var77 = scePaf_336E37F3 (var66, var68);
              if (var49 == 0x00000000)
              {
                __asm__ ("break      0x00007;");
              }
              var78 = ((int *) sp)[16];
              scePaf_6D03433C (var66, 0x00000000, var78, var74, ((((var77 + var49) + 0xFFFFFFFF) / var49) * var49));
              var81 = ((int *) var42)[14];
              if ((((var81 + 0xFFFFFFFC) < 0x00000004)) != 0x00000000)
              {
                var96 var97 = scePaf_7DF2134C (var43, 0x00000001);
                ((int *) sp)[29] = var97;
                ((int *) sp)[28] = var96;
                if (var96 == 0x00000000)
                {

                label90:
                  var82 = ((int *) sp)[0];
                  if (!(var43 == 0x00000000))
                  {
                    scePaf_94E322DD (var43);
                    scePaf_4508F2FA (var43);
                    var82 = ((int *) sp)[0];
                  }
                  if (var82 == 0x00000000)
                  {
                    var88 = ((int *) sp)[0];
                  }
                  else
                  {
                    var87 = ((int *) var82)[1];
                    ((int *) var82)[1] = (var87 + 0x00000001);
                    var88 = ((int *) sp)[0];
                  }
                  sub_32448 ((var4 + 0x00000018), var88);
                  var91 = sp;
                  sub_32408 (var2, var91);
                  var15 = ((int *) sp)[4];
                }
                else
                {
                  var98 = sp + 0x00000080;
                  sub_32428 (var98, 0x00000000);
                  var101 = ((int *) var43)[31];
                  if (var101 < 0)
                  {

                  label64:
                    var102 = ((int *) sp)[32];
                  }
                  else
                  {
                    if (((var101 < 0x00000003)) != 0x00000000)
                    {
                      var150 = scePaf_5C068AD6 (0x00000024);
                      var151 = ((int *) sp)[29];
                      var152 = ((int *) var43)[31];
                      var153 = ((int *) var1)[0];
                      var143 = var150;

                    label59:
                      scePaf_96383E99 (var143, var142, var141, (var140 >> 0x00000002));
                      sub_324C0 (var98, var143);
                      var102 = ((int *) sp)[32];
                    }
                    else
                    {
                      if (!(var101 == 0x00000003))
                        goto label64;
                      var139 = scePaf_5C068AD6 (0x00000024);
                      var140 = ((int *) sp)[29];
                      var141 = ((int *) var43)[31];
                      var142 = ((int *) var1)[0];
                      var143 = var139;
                      goto label59;
                    }
                  }
                  if (var102 != 0x00000000)
                  {
                    var122 = ((int *) sp)[28];
                    scePaf_A151DD55 (var102, var122);
                    var125 = ((int *) sp)[0];
                    scePaf_D59E54BC (var125, var98);
                    var128 = ((int *) sp)[32];
                    if (!(var128 == 0x00000000))
                    {
                      var129 = ((int *) var128)[1];
                      var130 = var129 + 0xFFFFFFFF;
                      ((int *) var128)[1] = var130;
                      if (!(var130 > 0))
                      {
                        var131 = ((int *) var128)[0];
                        var132 = ((int *) var131)[1];
                        var135 var136 = (*var132) (var128);
                      }
                    }
                    goto label90;
                  }
                  else
                  {
                    var103 = sp;
                    sub_32448 (var103, 0x00000000);
                    var106 = var2;
                    if (!(var43 == 0x00000000))
                    {
                      scePaf_94E322DD (var43);
                      scePaf_4508F2FA (var43);
                      var106 = var2;
                    }
                    sub_32328 (var106, 0x00000000);
                    var113 = ((int *) sp)[32];
                    var15 = ((int *) sp)[4];
                    if (!(var113 == 0x00000000))
                    {
                      var114 = ((int *) var113)[1];
                      var115 = var114 + 0xFFFFFFFF;
                      ((int *) var113)[1] = var115;
                      if (var115 > 0)
                        goto label114;
                      var116 = ((int *) var113)[0];
                      var117 = ((int *) var116)[1];
                      var120 var121 = (*var117) (var113);
                      var15 = ((int *) sp)[4];
                    }
                  }
                }
              }
              else
              goto label90;
            }
            else
            {
              var69 = ((int *) var66)[20];
              if (var69 != 0x00000000)
                goto label37;
              if (var43 == 0x00000000)
              {
                var12 = var2;
              }
              else
              {
                scePaf_94E322DD (var43);
                scePaf_4508F2FA (var43);
                var12 = var2;
              }
              goto label112;
            }
          }
        }
        else
        {
          var12 = var2;
          goto label112;
        }
      }
    }
    else
    goto label20;
    if (var15 != 0x00000000)
    {
      var33 = ((int *) sp)[5];
      var36 var37 = (*var15) (var33);
      var16 = ((int *) sp)[0];
    }
    else
    {
      var16 = ((int *) sp)[0];
    }
  }
  if (!(var16 == 0x00000000))
  {
    var17 = ((int *) var16)[1];
    var18 = var17 + 0xFFFFFFFF;
    ((int *) var16)[1] = var18;
    if (var18 <= 0)
    {
      var27 = ((int *) var16)[0];
      var28 = ((int *) var27)[1];
      var31 var32 = (*var28) (var16);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[44];
  var19 = ((int *) sp)[43];
  var20 = ((int *) sp)[42];
  var21 = ((int *) sp)[41];
  var22 = ((int *) sp)[40];
  var23 = ((int *) sp)[39];
  var24 = ((int *) sp)[38];
  var25 = ((int *) sp)[37];
  var26 = ((int *) sp)[36];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x00024078
 */
void sub_24078 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg2)[6];
  var2 = arg2;
  if (!(var1 == 0x00000000))
  {
    var3 = ((int *) var1)[1];
    var4 = var3 + 0xFFFFFFFF;
    ((int *) var1)[1] = var4;
    if (var4 <= 0)
    {
      if (var1 == 0x00000000)
      {

      label8:
        var5 = var2 + 0x00000018;
      }
      else
      {
        var9 = ((int *) var1)[0];
        var10 = ((int *) var9)[1];
        var13 var14 = (*var10) (var1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        var5 = var2 + 0x00000018;
      }
    }
    else
    goto label8;
    sub_32448 (var5, 0x00000000);
  }
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000240DC
 */
void sub_240DC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg3 + 0xFFFFFFFF;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (!(var1 < 0))
  {
    var3 = ((int *) arg1)[5];
    var4 = arg3 << 0x00000002;
    if ((((arg3 + 0x00000004) < var3)) != 0x00000000)
    {
      var18 = ((int *) arg1)[6];
      var19 = ((int *) arg1)[4];
      var20 = ((int *) (var4 + var18))[4];
      sub_24E78 (arg1, (var19 + (var20 * 0x00000058)));
      var5 = ((int *) var2)[6];
    }
    else
    {
      var5 = ((int *) var2)[6];
    }
    var6 = ((int *) var2)[4];
    var7 = ((int *) (var4 + var5))[1073741823];
    var8 = (var7 * 0x00000058);
    sub_24D70 (var2, (var6 + var8));
    var11 = ((int *) var2)[4];
    sub_24ED8 (var2, (var11 + var8), arg2, var1);
  }
  ra = ((int *) sp)[4];
  var14 = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000241A0
 */
void sub_241A0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg3 + 0xFFFFFFFD;
  ((int *) sp)[2] = s2;
  var2 = arg3 + 0x00000002;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[4] = ra;
  var4 = ((int *) arg1)[5];
  if (!(((var2 < var4)) == 0x00000000))
  {
    if (!(var1 < 0))
    {
      var5 = ((int *) arg1)[4];
      sub_24E78 (arg1, (var5 + (var1 * 0x00000058)));
    }
    var8 = ((int *) var3)[6];
    var9 = ((int *) var3)[4];
    var10 = ((int *) ((arg3 << 0x00000002) + var8))[2];
    var11 = (var10 * 0x00000058);
    sub_24D70 (var3, (var9 + var11));
    var14 = ((int *) var3)[4];
    sub_24ED8 (var3, (var14 + var11), arg2, var2);
  }
  ra = ((int *) sp)[4];
  var17 = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00024254
 */
void sub_24254 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var1 = arg3;
  ((int *) sp)[2] = s2;
  var2 = arg5;
  ((int *) sp)[1] = s1;
  var3 = arg4;
  ((int *) sp)[0] = s0;
  var4 = arg1;
  ((int *) sp)[5] = ra;
  if (arg4 != 0x00000000)
  {

  label12:
  }
  else
  {
    var5 = *((int *) 0x00048EEC);
    ((int *) arg1)[4] = 0x000486A8;
    ((int *) arg1)[5] = var5;
    ((int *) arg1)[6] = 0x00048E90;
    if (arg2 != 0x00000000)
      goto label12;
    if (((arg5 < var1)) != 0x00000000)
    {
      sub_240DC (arg1, arg2, arg5);
    }
    else
    {
      if (!(((var1 < arg5)) != 0x00000000))
        goto label12;
      sub_241A0 (arg1, arg2, arg5);
    }
  }
  if (var3 == 0x00000006)
  {
    var11 = *((int *) 0x00048EF0);
    ((int *) var4)[4] = 0x00048B20;
    ((int *) var4)[5] = var11;
    ((int *) var4)[6] = 0x00048EC4;
    if (arg2 != var3)
    {

    label25:
      ra = ((int *) sp)[5];
    }
    else
    {
      if (((var2 < var1)) != 0x00000000)
      {
        sub_240DC (var4, 0x00000006, var2);
        ra = ((int *) sp)[5];
      }
      else
      {
        if (((var1 < var2)) == 0x00000000)
        {
          ra = ((int *) sp)[5];
        }
        else
        {
          sub_241A0 (var4, 0x00000006, var2);
          ra = ((int *) sp)[5];
        }
      }
    }
  }
  else
  goto label25;
  var6 = ((int *) sp)[4];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002437C
 */
void sub_2437C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[11] = s7;
  var1 = arg3;
  ((int *) sp)[7] = s3;
  var2 = arg1;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = fp;
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  if (arg2 != 0x00000000)
  {
    ra = ((int *) sp)[13];
    if (!(arg2 != 0x00000006))
    {
      var3 = *((int *) 0x00048EF0);
      var4 = 0x00048EC4;
      var5 = 0x00000003;

    label6:
      var6 = (var5 << 0x00000004) + 0x00046E0C;
      var7 = ((int *) var6)[0];
      var8 = 0x00000000;
      if (!(var7 <= 0))
      {
        var9 = arg2 << 0x00000018;
        var10 = 0x00000000;
        while (1) {
          var11 = sp;
          sub_32328 (var11, 0x00000000);
          var14 = ((int *) var2)[3];
          var15 = var8 << 0x00000010;
          var16 = ((int *) var14)[0];
          var17 = sp;
          var18 = ((int *) var16)[43];
          var8 = var8 + 0x00000001;
          var21 var22 = (*var18) (var14, var17, (var9 | var15));
          var23 = ((int *) sp)[0];
          var24 = sp;
          if (!(var23 == 0x00000000))
          {
            var25 = ((int *) var23)[1];
            var26 = var25 + 0xFFFFFFFF;
            ((int *) var23)[1] = var26;
            if (var26 <= 0)
            {
              var86 = ((int *) var23)[0];
              var87 = ((int *) var86)[1];
              var90 var91 = (*var87) (var23);
              var24 = sp;
            }
            else
            {
              var24 = sp;
            }
          }
          sub_32328 (var24, 0x00000000);
          var29 = ((int *) var2)[3];
          var30 = ((int *) var29)[0];
          var31 = ((int *) var30)[43];
          var32 = sp;
          var35 var36 = (*var31) (var29, var32, ((var9 | var15) | 0x0000000E));
          var37 = ((int *) sp)[0];
          var38 = sp;
          if (!(var37 == 0x00000000))
          {
            var39 = ((int *) var37)[1];
            var40 = var39 + 0xFFFFFFFF;
            ((int *) var37)[1] = var40;
            if (var40 <= 0)
            {
              var80 = ((int *) var37)[0];
              var81 = ((int *) var80)[1];
              var84 var85 = (*var81) (var37);
              var38 = sp;
            }
            else
            {
              var38 = sp;
            }
          }
          sub_32328 (var38, 0x00000000);
          var43 = ((int *) var2)[3];
          var44 = ((int *) var43)[0];
          var45 = ((int *) var44)[43];
          var46 = sp;
          var49 var50 = (*var45) (var43, var46, ((var9 | var15) | 0x00000007));
          var51 = ((int *) sp)[0];
          if (var51 == 0x00000000)
          {
            var54 = ((int *) var6)[2];
          }
          else
          {
            var52 = ((int *) var51)[1];
            var53 = var52 + 0xFFFFFFFF;
            ((int *) var51)[1] = var53;
            if (var53 <= 0)
            {
              var74 = ((int *) var51)[0];
              var75 = ((int *) var74)[1];
              var78 var79 = (*var75) (var51);
              var54 = ((int *) var6)[2];
            }
            else
            {
              var54 = ((int *) var6)[2];
            }
          }
          sub_24E78 (var2, (var54 + var10));
          var57 = ((int *) var6)[0];
          var10 = var10 + 0x00000058;
          if (((var8 < var57)) != 0x00000000)
            continue;
          break;
        }
      }
      var58 = ((var1 << 0x00000002) + var4) + 0xFFFFFFF8;
      var59 = var1 + 0xFFFFFFFE;
      var60 = 0x00000000;
      while (1) {
        var60 = var60 + 0x00000001;
        if (var59 < 0)
        {

        label47:
          var59 = var59 + 0x00000001;
          var58 = var58 + 0x00000004;
          if (((var60 < 0x00000005)) != 0x00000000)
            continue;
          ra = ((int *) sp)[13];
        }
        else
        {
          ra = ((int *) sp)[13];
          if (((var59 < var3)) == 0x00000000)
            break;
          var61 = ((int *) var58)[0];
          var62 = ((int *) var6)[2];
          sub_24D70 (var2, (var62 + (var61 * 0x00000058)));
          goto label47;
        }
      }
    }
  }
  else
  {
    var3 = *((int *) 0x00048EEC);
    var4 = 0x00048E90;
    var5 = 0x00000002;
    goto label6;
  }
  var65 = ((int *) sp)[12];
  var66 = ((int *) sp)[11];
  var67 = ((int *) sp)[10];
  var68 = ((int *) sp)[9];
  var69 = ((int *) sp)[8];
  var70 = ((int *) sp)[7];
  var71 = ((int *) sp)[6];
  var72 = ((int *) sp)[5];
  var73 = ((int *) sp)[4];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x000245DC
 */
void sub_245DC (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = fp;
  ((int *) sp)[15] = s7;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[11] = s3;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  ((int *) sp)[12] = s4;
  var1 = 0x00000000;
  ((int *) sp)[10] = s2;
  var2 = arg1;
  var3 = sp;
  while (1) {
    sub_32328 (var3, 0x00000000);
    var6 = ((int *) var2)[3];
    var7 = var1 << 0x00000018;
    var8 = ((int *) var6)[0];
    var9 = sp;
    var10 = ((int *) var8)[43];
    var1 = var1 + 0x00000001;
    var13 var14 = (*var10) (var6, var9, (var7 | 0x00000019));
    var15 = ((int *) sp)[0];
    var16 = sp;
    if (!(var15 == 0x00000000))
    {
      var17 = ((int *) var15)[1];
      var18 = var17 + 0xFFFFFFFF;
      ((int *) var15)[1] = var18;
      if (var18 <= 0)
      {
        var309 = ((int *) var15)[0];
        var310 = ((int *) var309)[1];
        var313 var314 = (*var310) (var15);
        var16 = sp;
      }
      else
      {
        var16 = sp;
      }
    }
    sub_32328 (var16, 0x00000000);
    var21 = ((int *) var2)[3];
    var22 = ((int *) var21)[0];
    var23 = ((int *) var22)[43];
    var24 = sp;
    var27 var28 = (*var23) (var21, var24, (var7 | 0x0000001E));
    var29 = ((int *) sp)[0];
    var30 = sp;
    if (!(var29 == 0x00000000))
    {
      var31 = ((int *) var29)[1];
      var32 = var31 + 0xFFFFFFFF;
      ((int *) var29)[1] = var32;
      if (var32 <= 0)
      {
        var303 = ((int *) var29)[0];
        var304 = ((int *) var303)[1];
        var307 var308 = (*var304) (var29);
        var30 = sp;
      }
      else
      {
        var30 = sp;
      }
    }
    sub_32328 (var30, 0x00000000);
    var35 = ((int *) var2)[3];
    var36 = ((int *) var35)[0];
    var37 = ((int *) var36)[43];
    var38 = sp;
    var41 var42 = (*var37) (var35, var38, (var7 | 0x0000001F));
    var43 = ((int *) sp)[0];
    var44 = (var1 < 0x00000008);
    if (!(var43 == 0x00000000))
    {
      var45 = ((int *) var43)[1];
      var46 = var45 + 0xFFFFFFFF;
      ((int *) var43)[1] = var46;
      if (var46 <= 0)
      {
        var297 = ((int *) var43)[0];
        var298 = ((int *) var297)[1];
        var301 var302 = (*var298) (var43);
        var44 = (var1 < 0x00000008);
      }
      else
      {
        var44 = (var1 < 0x00000008);
      }
    }
    var3 = sp;
    if (var44 != 0x00000000)
      continue;
    break;
  }
  var47 = ((int *) var2)[3];
  var48 = 0x00000000;
  while (1) {
    while (1) {
      var50 = 0xFFFFFFFF;
      if (!(var48 < 0))
      {
        var51 = ((int *) var47)[205];
        if (((var48 < var51)) == 0x00000000)
        {
          var50 = 0xFFFFFFFF;
        }
        else
        {
          var52 = ((int *) var47)[216];
          var53 = ((int *) (var52 + (var48 << 0x00000002)))[0];
          var50 = ((int *) var53)[204];
        }
      }
      if (((var49 < var50)) == 0x00000000)
        break;
      var54 = sp;
      sub_32328 (var54, 0x00000000);
      var57 = ((int *) var2)[3];
      var58 = var48 << 0x00000018;
      var59 = var49 << 0x00000010;
      var60 = ((int *) var57)[0];
      var61 = ((int *) var60)[43];
      var62 = sp;
      var65 var66 = (*var61) (var57, var62, (var58 | var59));
      var67 = ((int *) sp)[0];
      if (var67 == 0x00000000)
      {
        var70 = sp;
      }
      else
      {
        var68 = ((int *) var67)[1];
        var69 = var68 + 0xFFFFFFFF;
        ((int *) var67)[1] = var69;
        if (var69 <= 0)
        {
          var110 = ((int *) var67)[0];
          var111 = ((int *) var110)[1];
          var114 var115 = (*var111) (var67);
          var70 = sp;
        }
        else
        {
          var70 = sp;
        }
      }
      sub_32328 (var70, 0x00000000);
      var73 = ((int *) var2)[3];
      var74 = ((int *) var73)[0];
      var75 = ((int *) var74)[43];
      var76 = sp;
      var79 var80 = (*var75) (var73, var76, ((var58 | var59) | 0x0000000E));
      var81 = ((int *) sp)[0];
      if (var81 == 0x00000000)
      {
        var84 = sp;
      }
      else
      {
        var82 = ((int *) var81)[1];
        var83 = var82 + 0xFFFFFFFF;
        ((int *) var81)[1] = var83;
        if (var83 <= 0)
        {
          var104 = ((int *) var81)[0];
          var105 = ((int *) var104)[1];
          var108 var109 = (*var105) (var81);
          var84 = sp;
        }
        else
        {
          var84 = sp;
        }
      }
      sub_32328 (var84, 0x00000000);
      var87 = ((int *) var2)[3];
      var88 = ((int *) var87)[0];
      var89 = ((int *) var88)[43];
      var90 = sp;
      var93 var94 = (*var89) (var87, var90, ((var58 | var59) | 0x00000007));
      var95 = ((int *) sp)[0];
      if (var95 == 0x00000000)
      {
        var47 = ((int *) var2)[3];
      }
      else
      {
        var96 = ((int *) var95)[1];
        var97 = var96 + 0xFFFFFFFF;
        ((int *) var95)[1] = var97;
        if (var97 <= 0)
        {
          var98 = ((int *) var95)[0];
          var99 = ((int *) var98)[1];
          var102 var103 = (*var99) (var95);
          var47 = ((int *) var2)[3];
        }
        else
        {
          var47 = ((int *) var2)[3];
        }
      }
      var49 = var49 + 0x00000001;
      continue;
    }
    var48 = var48 + 0x00000001;
    if (((var48 < 0x00000008)) != 0x00000000)
      continue;
    break;
  }
  var116 = 0x00046E0C;
  var117 = 0x00000003;
  while (1) {
    var118 = ((int *) var116)[0];
    var119 = 0x00000000;
    if (!(var118 <= 0))
    {
      var120 = 0x00000000;
      while (1) {
        var121 = ((int *) var116)[2];
        var119 = var119 + 0x00000001;
        sub_24078 (var2, ((var121 + var120) + 0x0000003C));
        var124 = ((int *) var116)[2];
        sub_24078 (var2, ((var124 + var120) + 0x00000020));
        var127 = ((int *) var116)[2];
        sub_24078 (var2, ((var127 + var120) + 0x00000004));
        var130 = ((int *) var116)[2];
        var131 = var120 + var130;
        ((int *) var131)[0] = 0x00000000;
        sub_23410 (var2, (var131 + 0x0000003C));
        var134 = ((int *) var116)[2];
        sub_23410 (var2, ((var134 + var120) + 0x00000020));
        var137 = ((int *) var116)[2];
        sub_23410 (var2, ((var137 + var120) + 0x00000004));
        var140 = ((int *) var116)[0];
        var120 = var120 + 0x00000058;
        if (((var119 < var140)) != 0x00000000)
          continue;
        break;
      }
    }
    var117 = var117 + 0xFFFFFFFF;
    var116 = var116 + 0x00000010;
    if (var117 >= 0)
      continue;
    break;
  }
  sub_23450 (var2);
  var143 = 0x00000000;
  var144 = sp + 0x00000010;
  var145 = 0x00000000;
  var146 = 0x00000000;
  var147 = 0x00000000;
  while (1) {
    var148 = sp;
    sub_32328 (var148, 0x00000000);
    sub_23B40 (var144, var2, (var147 + "tex_system"));
    var153 = ((int *) var2)[3];
    var154 = var143 << 0x00000018;
    var155 = ((int *) var153)[0];
    var156 = ((int *) var155)[43];
    var159 var160 = (*var156) (var153, var144, (var154 | 0x00000019));
    var161 = ((int *) sp)[4];
    if (!(var161 == 0x00000000))
    {
      var162 = ((int *) var161)[1];
      var163 = var162 + 0xFFFFFFFF;
      ((int *) var161)[1] = var163;
      if (var163 <= 0)
      {
        var291 = ((int *) var161)[0];
        var292 = ((int *) var291)[1];
        var295 var296 = (*var292) (var161);
      }
      else
      {
      }
    }
    sub_23B40 (var144, var2, (var146 + 0x00043EEC));
    var166 = ((int *) sp)[4];
    var167 = sp;
    sub_32448 (var167, var166);
    var170 = ((int *) sp)[4];
    var171 = ((int *) sp)[0];
    if (!(var170 == 0x00000000))
    {
      var172 = ((int *) var170)[1];
      var173 = var172 + 0xFFFFFFFF;
      ((int *) var170)[1] = var173;
      if (var173 <= 0)
      {
        var285 = ((int *) var170)[0];
        var286 = ((int *) var285)[1];
        var289 var290 = (*var286) (var170);
        var171 = ((int *) sp)[0];
      }
      else
      {
        var171 = ((int *) sp)[0];
      }
    }
    if (var171 != 0x00000000)
    {
      var264 = ((int *) var2)[3];
      var265 = var154 | 0x0000001E;
      var266 = sp;
      var267 = ((int *) var264)[0];
      var268 = ((int *) var267)[43];
      var271 var272 = (*var268) (var264, var266, var265);
      var273 = ((int *) sp)[0];
      var274 = ((int *) var2)[3];
      ((int *) var2)[10] = 0x00000000;
      var275 = ((short *) var273)[13];
      var276 = ((short *) var273)[12];
      var277 = ((int *) var274)[0];
      var278 = var275 << 0x00000001;
      var279 = var276 << 0x00000001;
      __asm__ ("mtc1       $v0, $fpr1;"
               "mtc1       $v1, $fpr0;"
        : 
        : "=r"(var278), "=r"(var279));
      var280 = ((int *) var277)[34];
      __asm__ ("cvt.s.w    $fpr03, $fpr01;"
               "cvt.s.w    $fpr02, $fpr00;");
      __asm__ ("swc1       $fpr03, 36($s2);"
        : 
        : "=r"(var2));
      __asm__ ("swc1       $fpr02, 32($s2);"
        : 
        : "=r"(var2));
      var283 var284 = (*var280) (var274, var265, 0x00000012, (var2 + 0x00000020), var277);
    }
    else
    {
    }
    sub_23B40 (var144, var2, (var145 + "tex_sdwf_system"));
    var176 = ((int *) sp)[4];
    var177 = sp;
    sub_32448 (var177, var176);
    var180 = ((int *) sp)[4];
    if (var180 == 0x00000000)
    {
      var183 = ((int *) sp)[0];
    }
    else
    {
      var181 = ((int *) var180)[1];
      var182 = var181 + 0xFFFFFFFF;
      ((int *) var180)[1] = var182;
      if (var182 <= 0)
      {
        var258 = ((int *) var180)[0];
        var259 = ((int *) var258)[1];
        var262 var263 = (*var259) (var180);
        var183 = ((int *) sp)[0];
      }
      else
      {
        var183 = ((int *) sp)[0];
      }
    }
    if (var183 != 0x00000000)
    {
      var237 = ((int *) var2)[3];
      var238 = var154 | 0x0000001F;
      var239 = sp;
      var240 = ((int *) var237)[0];
      var241 = ((int *) var240)[43];
      var244 var245 = (*var241) (var237, var239, var238);
      var246 = ((int *) sp)[0];
      var247 = ((int *) var2)[3];
      ((int *) var2)[10] = 0x00000000;
      var248 = ((short *) var246)[13];
      var249 = ((short *) var246)[12];
      var250 = ((int *) var247)[0];
      var251 = var248 << 0x00000001;
      var252 = var249 << 0x00000001;
      __asm__ ("mtc1       $v0, $fpr1;"
               "mtc1       $v1, $fpr0;"
        : 
        : "=r"(var251), "=r"(var252));
      var253 = ((int *) var250)[34];
      __asm__ ("cvt.s.w    $fpr03, $fpr01;"
               "cvt.s.w    $fpr02, $fpr00;");
      __asm__ ("swc1       $fpr03, 36($s2);"
        : 
        : "=r"(var2));
      __asm__ ("swc1       $fpr02, 32($s2);"
        : 
        : "=r"(var2));
      var256 var257 = (*var253) (var247, var238, 0x00000012, (var2 + 0x00000020), var250);
      var183 = ((int *) sp)[0];
    }
    if (var183 == 0x00000000)
    {
      var143 = var143 + 0x00000001;

    label118:
      var186 = (var143 < 0x00000008);
    }
    else
    {
      var184 = ((int *) var183)[1];
      var185 = var184 + 0xFFFFFFFF;
      ((int *) var183)[1] = var185;
      if (var185 <= 0)
      {
        var231 = ((int *) var183)[0];
        var232 = ((int *) var231)[1];
        var143 = var143 + 0x00000001;
        var235 var236 = (*var232) (var183);
        var186 = (var143 < 0x00000008);
      }
      else
      {
        var143 = var143 + 0x00000001;
        goto label118;
      }
    }
    var147 = var147 + 0x00000048;
    var146 = var146 + 0x00000048;
    var145 = var145 + 0x00000048;
    if (var186 != 0x00000000)
      continue;
    break;
  }
  sub_2516C (var2);
  var189 = 0x00000001;
  var190 = ((int *) var2)[3];
  while (1) {
    var189 = var189 + 0x00000001;
    scePaf_83BADBDF (var190, var189);
    var193 = ((int *) var2)[3];
    if (((var189 < 0x00000006)) != 0x00000000)
      continue;
    break;
  }
  var194 = 0x00000000;
  var197 = scePaf_BE7032D1 (var193, 0x00000000);
  var198 = ((var197 << 0x00000002) + 0x00048E90) + 0xFFFFFFF8;
  var199 = var197 + 0xFFFFFFFE;
  while (1) {
    var194 = var194 + 0x00000001;
    if (var199 < 0)
    {

    label136:
      var199 = var199 + 0x00000001;
      var198 = var198 + 0x00000004;
      if (((var194 < 0x00000005)) != 0x00000000)
        continue;
      var207 = ((int *) var2)[3];
    }
    else
    {
      var200 = *((int *) 0x00048EEC);
      if (((var199 < var200)) == 0x00000000)
        break;
      var201 = ((int *) var198)[0];
      sub_24D70 (var2, ((var201 * 0x00000058) + 0x000486A8));
      var204 = ((int *) var198)[0];
      sub_24ED8 (var2, ((var204 * 0x00000058) + 0x000486A8), 0x00000000, var199);
      goto label136;
    }
    goto label138;
  }
  var230 = ((int *) var2)[3];

label138:
  var208 = 0x00000000;
  var211 = scePaf_BE7032D1 (var207, 0x00000006);
  var212 = ((var211 << 0x00000002) + 0x00048EC4) + 0xFFFFFFF8;
  var213 = var211 + 0xFFFFFFFE;
  while (1) {
    var208 = var208 + 0x00000001;
    if (var213 < 0)
    {

    label147:
      var213 = var213 + 0x00000001;
      var212 = var212 + 0x00000004;
      if (((var208 < 0x00000005)) != 0x00000000)
        continue;
      ra = ((int *) sp)[17];
    }
    else
    {
      var214 = *((int *) 0x00048EF0);
      ra = ((int *) sp)[17];
      if (((var213 < var214)) == 0x00000000)
        break;
      var215 = ((int *) var212)[0];
      sub_24D70 (var2, ((var215 * 0x00000058) + 0x00048B20));
      var218 = ((int *) var212)[0];
      sub_24ED8 (var2, ((var218 * 0x00000058) + 0x00048B20), 0x00000006, var213);
      goto label147;
    }
  }
  var221 = ((int *) sp)[16];
  var222 = ((int *) sp)[15];
  var223 = ((int *) sp)[14];
  var224 = ((int *) sp)[13];
  var225 = ((int *) sp)[12];
  var226 = ((int *) sp)[11];
  var227 = ((int *) sp)[10];
  var228 = ((int *) sp)[9];
  var229 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00024D70
 */
void sub_24D70 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var2 = ((int *) arg2)[0];
  var3 = arg2;
  if (var2 == 0x00000001)
  {

  label28:
    ra = ((int *) sp)[6];
  }
  else
  {
    ((int *) arg2)[0] = 0x00000001;
    var4 = sp;
    sub_23C0C (var4, var1, (arg2 + 0x00000004));
    var7 = ((int *) sp)[0];
    if (var7 == 0x00000000)
    {
      var10 = sp;
    }
    else
    {
      var8 = ((int *) var7)[1];
      var9 = var8 + 0xFFFFFFFF;
      ((int *) var7)[1] = var9;
      if (var9 <= 0)
      {
        var36 = ((int *) var7)[0];
        var37 = ((int *) var36)[1];
        var40 var41 = (*var37) (var7);
        var10 = sp;
      }
      else
      {
        var10 = sp;
      }
    }
    sub_23C0C (var10, var1, (var3 + 0x00000020));
    var13 = ((int *) sp)[0];
    if (var13 == 0x00000000)
    {
      var16 = sp;
    }
    else
    {
      var14 = ((int *) var13)[1];
      var15 = var14 + 0xFFFFFFFF;
      ((int *) var13)[1] = var15;
      if (var15 <= 0)
      {
        var30 = ((int *) var13)[0];
        var31 = ((int *) var30)[1];
        var34 var35 = (*var31) (var13);
        var16 = sp;
      }
      else
      {
        var16 = sp;
      }
    }
    sub_23C0C (var16, var1, (var3 + 0x0000003C));
    var19 = ((int *) sp)[0];
    ra = ((int *) sp)[6];
    if (!(var19 == 0x00000000))
    {
      var20 = ((int *) var19)[1];
      var21 = var20 + 0xFFFFFFFF;
      ((int *) var19)[1] = var21;
      if (!(var21 <= 0))
        goto label28;
      var24 = ((int *) var19)[0];
      var25 = ((int *) var24)[1];
      var28 var29 = (*var25) (var19);
      ra = ((int *) sp)[6];
    }
  }
  var22 = ((int *) sp)[5];
  var23 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00024E78
 */
void sub_24E78 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = ra;
  var3 = ((int *) var2)[0];
  if (var3 != 0x00000000)
  {
    sub_24078 (arg1, (arg2 + 0x0000003C));
    sub_24078 (var1, (var2 + 0x00000020));
    sub_24078 (var1, (var2 + 0x00000004));
    ((int *) var2)[0] = 0x00000000;
  }
  ra = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00024ED8
 */
void sub_24ED8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[10] = s2;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[12] = s4;
  var3 = sp + 0x00000010;
  ((int *) sp)[11] = s3;
  var4 = arg2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s5;
  var5 = arg3 << 0x00000018;
  ((int *) sp)[8] = s0;
  sub_23AF4 (var2, var1, (arg2 + 0x00000020));
  sub_23AF4 (var3, var1, (var4 + 0x00000004));
  var10 = ((int *) var1)[3];
  var11 = arg4 << 0x00000010;
  var12 = ((int *) var10)[0];
  var13 = ((int *) var12)[43];
  var16 var17 = (*var13) (var10, var3, (var5 | var11));
  var18 = ((int *) sp)[4];
  if (var18 == 0x00000000)
  {
    var21 = ((int *) var1)[3];
  }
  else
  {
    var19 = ((int *) var18)[1];
    var20 = var19 + 0xFFFFFFFF;
    ((int *) var18)[1] = var20;
    if (var20 <= 0)
    {
      var74 = ((int *) var18)[0];
      var75 = ((int *) var74)[1];
      var78 var79 = (*var75) (var18);
      var21 = ((int *) var1)[3];
    }
    else
    {
      var21 = ((int *) var1)[3];
    }
  }
  var22 = var5 | var11;
  var23 = ((int *) var21)[0];
  var24 = sp;
  var25 = ((int *) var23)[43];
  var28 var29 = (*var25) (var21, var24, (var22 | 0x0000000E));
  sub_23AF4 (var3, var1, (var4 + 0x0000003C));
  var32 = ((int *) var1)[3];
  var33 = ((int *) var32)[0];
  var34 = ((int *) var33)[43];
  var37 var38 = (*var34) (var32, var3, (var22 | 0x00000007));
  var39 = ((int *) sp)[4];
  if (var39 == 0x00000000)
  {
    var42 = ((int *) sp)[0];
  }
  else
  {
    var40 = ((int *) var39)[1];
    var41 = var40 + 0xFFFFFFFF;
    ((int *) var39)[1] = var41;
    if (var41 <= 0)
    {
      var68 = ((int *) var39)[0];
      var69 = ((int *) var68)[1];
      var72 var73 = (*var69) (var39);
      var42 = ((int *) sp)[0];
    }
    else
    {
      var42 = ((int *) sp)[0];
    }
  }
  if (var42 != 0x00000000)
  {
    var57 = ((short *) var42)[13];
    var58 = ((short *) var42)[12];
    var59 = ((int *) var1)[3];
    var60 = var57 << 0x00000001;
    var61 = var58 << 0x00000001;
    __asm__ ("mtc1       $v0, $fpr1;"
             "mtc1       $v1, $fpr0;"
      : 
      : "=r"(var60), "=r"(var61));
    var62 = ((int *) var59)[0];
    __asm__ ("cvt.s.w    $fpr03, $fpr01;"
             "cvt.s.w    $fpr02, $fpr00;");
    ((int *) var1)[10] = 0x00000000;
    __asm__ ("swc1       $fpr02, 32($s2);"
      : 
      : "=r"(var1));
    __asm__ ("swc1       $fpr03, 36($s2);"
      : 
      : "=r"(var1));
    var63 = ((int *) var62)[34];
    var66 var67 = (*var63) (var59, ((var5 | var11) | 0x0000000E), 0x00000012, (var1 + 0x00000020));
    var42 = ((int *) sp)[0];
  }
  ra = ((int *) sp)[14];
  if (!(var42 == 0x00000000))
  {
    var43 = ((int *) var42)[1];
    var44 = var43 + 0xFFFFFFFF;
    ((int *) var42)[1] = var44;
    if (var44 <= 0)
    {
      var51 = ((int *) var42)[0];
      var52 = ((int *) var51)[1];
      var55 var56 = (*var52) (var42);
      ra = ((int *) sp)[14];
    }
    else
    {
      ra = ((int *) sp)[14];
    }
  }
  var45 = ((int *) sp)[13];
  var46 = ((int *) sp)[12];
  var47 = ((int *) sp)[11];
  var48 = ((int *) sp)[10];
  var49 = ((int *) sp)[9];
  var50 = ((int *) sp)[8];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x000250B0
 */
void sub_250B0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  var1 = 0x00048E90;
  ((int *) sp)[4] = s0;
  var2 = arg2;
  ((int *) sp)[7] = ra;
  ((int *) sp)[5] = s1;
  if (arg2 != 0x00000000)
  {
    ra = ((int *) sp)[7];
    if (!(arg2 != 0x00000006))
    {
      var3 = *((int *) 0x00048EF0);
      var1 = 0x00048EC4;

    label6:
      var4 = sp;
      var5 = sp + 0x00000004;
      var6 = sp + 0x00000008;
      var9 = sub_253EC (arg3, var4, var5, var6);
      if (!(var9 < 0))
      {
        var10 = ((int *) sp)[1];
        ((int *) ((var3 << 0x00000002) + var1))[0] = var10;
        if (var2 != 0x00000000)
        {
          if (!(var2 != 0x00000006))
          {
            var15 = *((int *) 0x00048EF0);
            *((int *) 0x00048EF0) = (var15 + 0x00000001);
          }
        }
        else
        {
          var11 = *((int *) 0x00048EEC);
          *((int *) 0x00048EEC) = (var11 + 0x00000001);
        }
      }
      ra = ((int *) sp)[7];
    }
  }
  else
  {
    var3 = *((int *) 0x00048EEC);
    goto label6;
  }
  var12 = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002516C
 */
void sub_2516C (int arg1)
{
  sp = sp + 0xFFFFFF80;
  var1 = 0x7FFFFFFF;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x7FFFFFFF));
  ((int *) sp)[29] = ra;
  ((int *) sp)[20] = s0;
  __asm__ ("swc1       $fpr00, 0($sp);"
           "swc1       $fpr00, 4($sp);"
           "swc1       $fpr00, 8($sp);"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr00, 16($sp);"
           "swc1       $fpr00, 20($sp);"
           "swc1       $fpr00, 24($sp);"
           "swc1       $fpr00, 28($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[28] = fp;
  ((int *) sp)[27] = s7;
  var2 = sp + 0x00000020;
  ((int *) sp)[26] = s6;
  var3 = sp + 0x00000030;
  ((int *) sp)[25] = s5;
  var4 = sp + 0x00000040;
  ((int *) sp)[24] = s4;
  var5 = sp + 0x00000010;
  ((int *) sp)[23] = s3;
  var6 = 0x00048EF4;
  ((int *) sp)[22] = s2;
  var7 = arg1;
  ((int *) sp)[21] = s1;
  var8 = 0x00000000;
  var9 = *((int *) 0x00048EF4);
  while (1) {
    if (var9 != 0x00000000)
    {
      var57 = 0x42840000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 52($sp);"
        : 
        : "=r"(0x42840000), "=r"(sp));
      var58 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 56($sp);"
               "swc1       $fpr00, 60($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var59 = 0x40A00000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 68($sp);"
        : 
        : "=r"(0x40A00000), "=r"(sp));
      var60 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 76($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[18] = 0x00000000;
      scePaf_9F44CF86 (var2, var3, var4);
      var63 = 0x427C0000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x427C0000));
      var64 = ((int *) sp)[8];
      var65 = ((int *) sp)[11];
      __asm__ ("swc1       $fpr00, 52($sp);"
        : 
        : "=r"(sp));
      var66 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[0] = var64;
      var67 = ((int *) sp)[9];
      __asm__ ("swc1       $fpr00, 56($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = var67;
      var68 = ((int *) sp)[10];
      __asm__ ("swc1       $fpr00, 60($sp);"
        : 
        : "=r"(sp));
      var69 = 0x40A00000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(0x40A00000), "=r"(sp));
      var70 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[2] = var68;
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[3] = var65;
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[10] = 0x00000000;
      scePaf_9F44CF86 (var4, var3, var2);
      var17 = ((int *) sp)[16];
    }
    else
    {
      var10 = 0x42840000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 68($sp);"
        : 
        : "=r"(0x42840000), "=r"(sp));
      var11 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 76($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[16] = 0x00000000;
      __asm__ ("swc1       $fpr00, 72($sp);"
        : 
        : "=r"(sp));
      var12 = 0x427C0000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x427C0000));
      var13 = ((int *) sp)[16];
      var14 = ((int *) sp)[17];
      var15 = ((int *) sp)[19];
      var16 = ((int *) sp)[18];
      __asm__ ("swc1       $fpr00, 68($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[0] = var13;
      ((int *) sp)[1] = var14;
      ((int *) sp)[3] = var15;
      ((int *) sp)[2] = var16;
      var17 = var13;
    }
    var18 = ((int *) sp)[17];
    var19 = ((int *) var7)[3];
    ((int *) sp)[4] = var17;
    var20 = var8 << 0x00000018;
    ((int *) sp)[5] = var18;
    var21 = sp;
    var22 = ((int *) sp)[19];
    var23 = ((int *) sp)[18];
    var8 = var8 + 0x00000001;
    ((int *) sp)[7] = var22;
    var24 = ((int *) var19)[0];
    ((int *) sp)[6] = var23;
    var25 = ((int *) var24)[30];
    var6 = var6 + 0x00000004;
    var28 var29 = (*var25) (var19, (var20 | 0x0000004D), var21, arg4, arg5, arg6, arg7, arg8);
    var30 = ((int *) var7)[3];
    var31 = ((int *) var30)[0];
    var32 = ((int *) var31)[30];
    var35 var36 = (*var32) (var30, (var20 | 0x0000004E), var5);
    if (!(((var8 < 0x00000008)) != 0x00000000))
      break;
    var9 = ((int *) var6)[0];
    continue;
  }
  var37 = *((int *) 0x00048F0C);
  if (var37 == 0x00000000)
  {
    var47 = ((int *) var7)[3];
    var48 = 0x42800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 68($sp);"
      : 
      : "=r"(0x42800000), "=r"(sp));
    var49 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var50 = ((int *) var47)[0];
    ((int *) sp)[16] = 0x00000000;
    var51 = sp + 0x00000040;
    __asm__ ("swc1       $fpr00, 72($sp);"
      : 
      : "=r"(sp));
    var52 = ((int *) var50)[30];
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    var55 var56 = (*var52) (var47, 0x0600004E, var51);
    ra = ((int *) sp)[29];
  }
  else
  {
    ra = ((int *) sp)[29];
  }
  var38 = ((int *) sp)[28];
  var39 = ((int *) sp)[27];
  var40 = ((int *) sp)[26];
  var41 = ((int *) sp)[25];
  var42 = ((int *) sp)[24];
  var43 = ((int *) sp)[23];
  var44 = ((int *) sp)[22];
  var45 = ((int *) sp)[21];
  var46 = ((int *) sp)[20];
  sp = sp + 0x00000080;
  return;
}

/**
 * Subroutine at address 0x000253EC
 */
int sub_253EC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s7;
  var1 = arg4;
  ((int *) sp)[5] = s5;
  var2 = arg2;
  ((int *) sp)[4] = s4;
  ((int *) sp)[2] = s2;
  var3 = arg1;
  ((int *) sp)[8] = ra;
  ((int *) sp)[6] = s6;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (arg1 == 0x00000000)
  {

  label23:
    var7 = 0xFFFFFFFF;
    ((int *) var2)[0] = 0xFFFFFFFF;
  }
  else
  {
    var4 = ((char *) arg1)[0];
    var5 = 0x00046E0C;
    var6 = 0x00000000;
    if (!(var4 != 0x00000000))
      goto label23;
    while (1) {
      ((int *) var2)[0] = var6;
      var16 = ((int *) var5)[0];
      var17 = 0x00000000;
      if (var16 <= 0)
      {

      label21:
        var6 = var6 + 0x00000001;
        var5 = var5 + 0x00000010;
        if (((var6 < 0x00000004)) != 0x00000000)
          continue;
        ((int *) var2)[0] = 0xFFFFFFFF;
        var7 = 0xFFFFFFFF;
      }
      else
      {
        var18 = 0x00000000;
        var19 = ((int *) var5)[1];
        while (1) {
          ((int *) arg3)[0] = var17;
          var22 = scePaf_E3D530AE ((var19 + var18), var3);
          var17 = var17 + 0x00000001;
          if (var22 == 0x00000000)
            break;
          var23 = ((int *) var5)[1];
          var26 = scePaf_E3D530AE (((var23 + var18) + 0x00000018), var3);
          if (var26 == 0x00000000)
          {
            var32 = 0x00000001;

          label18:
            ((int *) var1)[0] = var32;
          }
          else
          {
            var27 = ((int *) var5)[1];
            var30 = scePaf_E3D530AE (((var27 + var18) + 0x00000030), var3);
            var18 = var18 + 0x00000048;
            if (var30 == 0x00000000)
            {
              var32 = 0x00000002;
              goto label18;
            }
            else
            {
              var31 = ((int *) var5)[0];
              if (!(((var17 < var31)) != 0x00000000))
                break;
              var19 = ((int *) var5)[1];
              continue;
            }
          }
          goto label24;
        }
        goto label21;
      }
      goto label24;
    }
    var7 = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
  }

label24:
  ra = ((int *) sp)[8];
  var8 = ((int *) sp)[7];
  var9 = ((int *) sp)[6];
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  var12 = ((int *) sp)[3];
  var13 = ((int *) sp)[2];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000030;
  return var7;
}

/**
 * Subroutine at address 0x00025534
 */
int sub_25534 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var1 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var2 = "tex_system";
  ((int *) sp)[0] = s0;
  var3 = 0x00000000;
  while (1) {
    var3 = var3 + 0x00000001;
    var6 = scePaf_E3D530AE (var2, arg1);
    if (var6 == 0x00000000)
      break;
    var2 = var2 + 0x00000020;
    if (((var3 < 0x00000045)) != 0x00000000)
      continue;
    ((int *) var1)[0] = 0x0000FFFF;
    var7 = 0xFFFFFFFF;
    var8 = 0xFFFFFFFF;
    goto label9;
  }
  var14 = ((int *) var2)[6];
  var7 = 0x00000000;
  ((int *) var1)[0] = var14;
  var8 = ((int *) var2)[7];

label9:
  ((int *) arg3)[0] = var8;
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var7;
}

/**
 * Subroutine at address 0x000255D4
 */
void sub_255D4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0x00000002;
  ((int *) sp)[0] = s0;
  var2 = arg1 + 0x00000004;
  while (1) {
    var1 = var1 + 0xFFFFFFFF;
    sub_32328 ((var2 + 0x00000018), 0x00000000);
    var2 = var2 + 0x0000001C;
    if (var1 != 0xFFFFFFFF)
      continue;
    break;
  }
  ra = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025624
 */
void sub_25624 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06094 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025644
 */
void sub_25644 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06094 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025664
 */
void sub_25664 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[11] = ra;
  __asm__ ("mtc1       $zr, $fpr12;");
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  var1 = ((int *) arg1)[0];
  var2 = *((int *) 0x00047B20);
  ((char *) var2)[276] = 0x00000001;
  var3 = ((int *) var1)[22];
  var4 = arg1;
  var7 var8 = (*var3) (arg1, 0x00000001, var1, arg4, arg5, arg6, arg7, arg8);
  var11 = scePaf_ED055C3C (var4, 0x01000003);
  var12 = *((int *) 0x00047B20);
  var13 = 0x41200000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x41200000));
  var14 = ((int *) var12)[652];
  var15 = ((int *) var14)[206];
  var16 = ((int *) var14)[216];
  var17 = ((int *) (var16 + (var15 << 0x00000002)))[0];
  scePaf_676BAC3B (var17);
  var20 = *((int *) 0x00047B20);
  __asm__ ("mtc1       $zr, $fpr12;");
  var21 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr13;"
    : 
    : "=r"(0x43480000));
  var22 = ((int *) var20)[652];
  __asm__ ("mov.s      $fpr14, $fpr12;");
  scePaf_6719522B (var22);
  var25 = *((int *) 0x00047B20);
  __asm__ ("mtc1       $zr, $fpr12;");
  var26 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr13;"
    : 
    : "=r"(0x43480000));
  var27 = ((int *) var25)[652];
  __asm__ ("mov.s      $fpr14, $fpr12;");
  scePaf_E9272129 (var27);
  var30 = *((int *) 0x00047B20);
  __asm__ ("mtc1       $zr, $fpr12;");
  var31 = ((int *) var30)[652];
  __asm__ ("mov.s      $fpr13, $fpr12;");
  var32 = ((int *) var31)[206];
  scePaf_9EC2F1FF (var31, var32);
  var35 = *((int *) 0x00047B20);
  ((int *) sp)[2] = 0x00000000;
  var36 = 0xC2A00000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0xC2A00000));
  var37 = sp;
  var38 = ((int *) var35)[652];
  __asm__ ("lwc1       $fpr13, 8($sp);"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var39 = 0x42AA0000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x42AA0000));
  var40 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var41 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  scePaf_75D8CDC6 (var38, var37, 0x00000001);
  var44 = *((int *) 0x00047B1C);
  var47 = scePaf_D27A723F (var44, "info_list");
  var48 = *((int *) 0x00047B20);
  var49 = var47;
  var50 = ((int *) var48)[653];
  if (var50 != 0x00000000)
  {
    var89 = sub_21720 (var48);
    var90 = *((int *) 0x00047B20);
    var93 = sub_21684 (var90, var89);
    var94 = *((int *) 0x00047B20);
    var95 = ((int *) var94)[653];
    sub_076EC (var95, (!(var93) ? 0x00001000 : 0x00000100));
    var98 = *((int *) 0x00047B20);
    __asm__ ("mtc1       $zr, $fpr13;");
    var99 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    var100 = ((int *) var98)[653];
    vsh_447ACC46 (var100);
    var51 = *((int *) 0x00047B20);
  }
  else
  {
    var51 = *((int *) 0x00047B20);
  }
  var52 = ((int *) var51)[49];
  if (var52 == 0x00000001)
  {
    sub_25A98 (var49);
    sub_25BE4 (var49);
    var53 = ((int *) var4)[0];
  }
  else
  {
    if (var52 == 0x00000002)
    {
      sub_25A98 (var49);
      sub_25E80 (var49);
      var53 = ((int *) var4)[0];
    }
    else
    {
      var53 = ((int *) var4)[0];
    }
  }
  var54 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var55 = 0x43C80000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43C80000));
  __asm__ ("swc1       $fpr00, 12($sp);"
           "mov.s      $fpr13, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[1] = 0x00000000;
  var56 = sp;
  ((int *) sp)[2] = 0x00000000;
  var57 = ((int *) var53)[50];
  var60 var61 = (*var57) (var4, 0x01000003, 0x00000004, var56);
  var62 = *((int *) 0x00047B20);
  var63 = ((int *) var62)[651];
  var64 = sp + 0x00000010;
  var67 = scePaf_970DC20D (var63, "msgsystem_back");
  sceVshCommonGui_25489D52 (var64, var67);
  sub_335E8 (var64);
  sceVshCommonGui_A745DB12 (0x00000001);
  sub_174C0 (0x00000001);
  ra = ((int *) sp)[11];
  var76 = ((int *) sp)[10];
  var77 = ((int *) sp)[9];
  var78 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000258CC
 */
void sub_258CC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[653];
  var3 = arg1;
  if (var2 == 0x00000000)
  {

  label4:
    var5 = ((int *) var1)[70];
    if (var5 <= 0)
    {
      var8 = ((int *) var1)[651];
      scePaf_F1F9D49A (var8, "snd_cancel");
      var11 = *((int *) 0x00047B20);
      ((int *) sp)[0] = 0x00000000;
      var12 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var13 = sp;
      __asm__ ("lwc1       $fpr13, 0($sp);");
      var14 = ((int *) var11)[652];
      var15 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      __asm__ ("swc1       $fpr13, 4($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr13, 8($sp);"
        : 
        : "=r"(sp));
      scePaf_75D8CDC6 (var14, var13, 0x00000000);
      var18 = *((int *) 0x00047B20);
      var19 = ((int *) var18)[653];
      if (var19 != 0x00000000)
      {
        vsh_794760F5 (var19, 0x00000000, 0x00000000);
        var49 = *((int *) 0x00047B20);
        __asm__ ("mtc1       $zr, $fpr13;");
        var50 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        var51 = ((int *) var49)[653];
        vsh_DD78EFF5 (var51);
        var54 = *((int *) 0x00047B20);
        var55 = ((int *) var54)[653];
        vsh_794760F5 (var55, 0x0002059C, var54);
        var20 = ((int *) var3)[0];
      }
      else
      {
        var20 = ((int *) var3)[0];
      }
      ((int *) sp)[0] = 0x00000000;
      var21 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var22 = ((int *) var20)[50];
      __asm__ ("lwc1       $fpr13, 0($sp);");
      ((int *) sp)[1] = 0x00000000;
      var23 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      ((int *) sp)[2] = 0x00000000;
      var24 = sp;
      var27 var28 = (*var22) (var3, 0x01000003, 0x00000004, var24);
      var29 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      scePaf_DE0E0F8B (var3, 0x0000007A, 0x00025A58, 0x00000000);
      sceVshCommonGui_A745DB12 (0x00000000);
      var34 = *((int *) 0x00047B20);
      var37 = sub_1B1B8 (var34);
      ra = ((int *) sp)[6];
      if (!(var37 == 0x00000000))
      {
        var40 = vsh_1B1CE2CF ();
        var41 = 0x00000001;
        if (!(var40 == 0x00000000))
        {
          var41 = 0x00000000;
        }
        sub_174C0 (var41);
        var44 = *((int *) 0x00047B20);
        sub_207BC (var44);
        ra = ((int *) sp)[6];
      }
    }
    else
    {
      ra = ((int *) sp)[6];
    }
  }
  else
  {
    var4 = ((int *) var2)[11];
    ra = ((int *) sp)[6];
    if (!(var4 == 0x00000001))
      goto label4;
  }
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00025A58
 */
void sub_25A58 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_12674 (0x00000001, 0x00000004);
  var3 = *((int *) 0x00047B1C);
  scePaf_E305A594 (var3, "page_info");
  var6 = *((int *) 0x00047B20);
  ra = ((int *) sp)[0];
  ((char *) var6)[276] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025A98
 */
void sub_25A98 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[15] = s7;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  var2 = *((int *) 0x00047B20);
  ((int *) sp)[11] = s3;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = fp;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[12] = s4;
  ((int *) sp)[10] = s2;
  ((int *) sp)[8] = s0;
  var5 = sub_1B9C0 (var2);
  var6 = var5;
  if (var5 != 0x00000000)
  {
    scePaf_ABCF9085 (var1, var5);
    var18 = 0x00000000;
    if (var6 <= 0)
    {

    label30:
      ra = ((int *) sp)[17];
    }
    else
    {
      var19 = 0x00000000;
      var20 = *((int *) 0x00047B20);
      while (1) {
        var21 = var18 << 0x00000010;
        var18 = var18 + 0x00000001;
        var24 = sub_1BB58 (var20);
        var25 = *((int *) 0x00047B1C);
        var28 = scePaf_970DC20D (var25, (var24 + var19));
        var29 = sp;
        ((int *) sp)[0] = 0x00000000;
        var19 = var19 + 0x00000018;
        ((int *) sp)[1] = 0x00000000;
        sub_33618 (var29, var28);
        var32 = ((int *) var1)[0];
        var33 = sp;
        var34 = ((int *) var32)[45];
        var37 var38 = (*var34) (var1, var33, (var21 | 0x000000C8));
        var39 = sp;
        sub_335E8 (var39);
        var42 = *((int *) 0x00047B1C);
        var45 = scePaf_970DC20D (var42, "msgshare_info_none");
        var46 = sp;
        ((int *) sp)[0] = 0x00000000;
        ((int *) sp)[1] = 0x00000000;
        sub_33618 (var46, var45);
        var49 = ((int *) var1)[0];
        var50 = sp;
        var51 = ((int *) var49)[45];
        var54 var55 = (*var51) (var1, var50, (var21 | 0x000000C9));
        var56 = sp;
        sub_335E8 (var56);
        if (!(((var18 < var6)) != 0x00000000))
          break;
        var20 = *((int *) 0x00047B20);
        continue;
      }
      ra = ((int *) sp)[17];
    }
  }
  else
  goto label30;
  var7 = ((int *) sp)[16];
  var8 = ((int *) sp)[15];
  var9 = ((int *) sp)[14];
  var10 = ((int *) sp)[13];
  var11 = ((int *) sp)[12];
  var12 = ((int *) sp)[11];
  var13 = ((int *) sp)[10];
  var14 = ((int *) sp)[9];
  var15 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00025BE4
 */
void sub_25BE4 (int arg1)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  var1 = arg1;
  ((int *) sp)[25] = s1;
  var2 = sp + 0x00000010;
  ((int *) sp)[24] = s0;
  ((int *) sp)[30] = ra;
  ((int *) sp)[29] = s5;
  var3 = *((int *) 0x00047B20);
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  var6 = sub_1B644 (var3);
  var7 = var2;
  if (!(var6 == 0x00000000))
  {
    var8 = ((int *) var6)[0];
    if (var8 == 0x00000010)
    {
      var9 = *((int *) 0x00047B20);

    label29:
      var18 = sp + 0x00000030;
      sub_217D8 (var18, var9, 0x00000001);
      sub_33668 (var2, var18);
      sub_335E8 (var18);
      var25 = *((int *) 0x00047B20);
      var26 = ((int *) var25)[722];

    label36:
      var27 = ((int *) var1)[0];
      var28 = sp + 0x00000010;
      var29 = ((int *) var27)[45];
      var32 var33 = (*var29) (var1, var28, 0x000000C9);
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      if (var26 == 0x00000000)
      {
        var60 = *((int *) 0x00047B1C);
        var63 = scePaf_970DC20D (var60, "msgshare_info_none");
        sub_33618 (var18, var63);
        var39 = sp + 0x00000050;
      }
      else
      {
        if (((var26 < 0x0000000A)) != 0x00000000)
        {
          ((short *) sp)[32] = (var26 + 0x00000030);
          ((short *) sp)[33] = 0x00000000;
        }
        else
        {
          ((short *) sp)[34] = 0x00000000;
          var34 = ((hi (var26 * 0x66666667)) >> 0x00000002) - (var26 >> 0x0000001F);
          ((short *) sp)[32] = (var34 + 0x00000030);
          ((short *) sp)[33] = ((var26 - (((var34 << 0x00000002) + var34) << 0x00000001)) + 0x00000030);
        }
        var35 = *((int *) 0x00047B1C);
        var38 = scePaf_970DC20D (var35, "msgshare_info_level");
        var39 = sp + 0x00000050;
        var40 = sp + 0x00000040;
        ((int *) sp)[0] = 0x00000000;
        ((int *) sp)[1] = 0x00000000;
        ((int *) sp)[2] = 0x00000000;
        scePaf_B580EF60 (var39, var38, var40, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
        sub_33668 (var18, var39);
        sub_335E8 (var39);
      }
      var47 = ((int *) sp)[12];
      ((int *) sp)[20] = 0x00000000;
      ((int *) sp)[21] = 0x00000000;
      sub_33618 (var39, var47);
      var50 = ((int *) var1)[0];
      var51 = ((int *) var50)[45];
      var54 var55 = (*var51) (var1, var39, 0x000100C9);
      sub_335E8 (var39);
      sub_335E8 (var18);
      var7 = sp + 0x00000010;
    }
    else
    {
      if (((var8 < 0x00000011)) == 0x00000000)
      {
        if (var8 == 0x00000011)
        {
          var74 = *((int *) 0x00047B20);
          var18 = sp + 0x00000030;
          sub_217D8 (var18, var74, 0x00000005);
          sub_33668 (var2, var18);
          sub_335E8 (var18);
          var81 = *((int *) 0x00047B20);
          var26 = ((int *) var81)[777];
          goto label36;
        }
        else
        {
          if (var8 != 0x00000015)
          {
            var7 = sp + 0x00000010;
          }
          else
          {
            var66 = *((int *) 0x00047B20);
            var18 = sp + 0x00000030;
            sub_217D8 (var18, var66, 0x00000009);
            sub_33668 (var2, var18);
            sub_335E8 (var18);
            var73 = *((int *) 0x00047B20);
            var26 = ((int *) var73)[667];
            goto label36;
          }
        }
      }
      else
      {
        var9 = *((int *) 0x00047B20);
        if (var8 == 0x0000000E)
          goto label29;
        var7 = sp + 0x00000010;
      }
    }
  }
  sub_335E8 (var7);
  ra = ((int *) sp)[30];
  var12 = ((int *) sp)[29];
  var13 = ((int *) sp)[28];
  var14 = ((int *) sp)[27];
  var15 = ((int *) sp)[26];
  var16 = ((int *) sp)[25];
  var17 = ((int *) sp)[24];
  sp = sp + 0x00000080;
  return;
}

/**
 * Subroutine at address 0x00025E80
 */
void sub_25E80 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  var2 = *((int *) 0x00047B20);
  ((int *) sp)[16] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[13] = s1;
  var5 = sub_20A8C (var2);
  var6 = sp;
  sceVshCommonUtil_AED013BF (var6, 0x00000008, var5);
  var9 = sp + 0x00000010;
  var10 = sp;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  sub_33618 (var9, var10);
  var13 = ((int *) var1)[0];
  var14 = ((int *) var13)[45];
  var17 var18 = (*var14) (var1, var9, 0x000000C9);
  sub_335E8 (var9);
  var21 = *((int *) 0x00047B20);
  var24 = sub_20AE8 (var21);
  var25 = sp;
  sceVshCommonUtil_AED013BF (var25, 0x00000008, var24);
  var28 = sp;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  sub_33618 (var9, var28);
  var31 = ((int *) var1)[0];
  var32 = ((int *) var31)[45];
  var35 var36 = (*var32) (var1, var9, 0x000100C9);
  sub_335E8 (var9);
  var41 = vsh_AF37F31D ();
  if (var41 != 0x00000000)
  {
    var46 = *((int *) 0x00047B1C);
    var49 = scePaf_970DC20D (var46, ((var41 << 0x00000005) + 0x00045324));
    ((int *) sp)[4] = 0x00000000;
    ((int *) sp)[5] = 0x00000000;
    sub_33618 (var9, var49);
    var52 = ((int *) var1)[0];
    var53 = ((int *) var52)[45];
    var56 var57 = (*var53) (var1, var9, 0x000200C9);
    sub_335E8 (var9);
    ra = ((int *) sp)[16];
  }
  else
  {
    ra = ((int *) sp)[16];
  }
  var42 = ((int *) sp)[15];
  var43 = ((int *) sp)[14];
  var44 = ((int *) sp)[13];
  var45 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00025FD0
 */
void sub_25FD0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  var4 = scePaf_ED055C3C (arg1, 0x0000007A);
  var5 = *((int *) 0x00047B20);
  var8 = sub_21E8C (var5, 0x00000001);
  var11 = scePaf_ED055C3C (var1, 0x0000007B);
  if ((var11 & 0x000000FF) != 0x00000000)
  {
    var28 = *((int *) 0x00047B20);
    var31 = sub_21E8C (var28, 0x00000000);
    var12 = ((int *) var1)[0];
  }
  else
  {
    var12 = ((int *) var1)[0];
  }
  ((int *) sp)[0] = 0x00000000;
  var13 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var14 = sp;
  var15 = ((int *) var12)[50];
  __asm__ ("lwc1       $fpr13, 0($sp);");
  ((int *) sp)[1] = 0x00000000;
  var16 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  ((int *) sp)[2] = 0x00000000;
  var19 var20 = (*var15) (var1, 0x01000003, 0x00000004, var14);
  var21 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  scePaf_DE0E0F8B (var1, 0x0000007B, 0x000260A4, 0x00000000);
  sceVshCommonGui_A745DB12 (0x00000000);
  ra = ((int *) sp)[6];
  var26 = ((int *) sp)[5];
  var27 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000260A4
 */
void sub_260A4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x00047B20);
  var2 = ((int *) var1)[653];
  if (var2 != 0x00000000)
  {
    vsh_794760F5 (var2, 0x00000000, 0x00000000);
    var21 = *((int *) 0x00047B20);
    __asm__ ("mtc1       $zr, $fpr12;");
    var22 = ((int *) var21)[653];
    __asm__ ("mov.s      $fpr13, $fpr12;");
    vsh_DD78EFF5 (var22);
    var25 = *((int *) 0x00047B20);
    var26 = ((int *) var25)[653];
    vsh_794760F5 (var26, 0x0002059C, var25);
    var29 = *((int *) 0x00047B1C);
  }
  else
  {
    var3 = *((int *) 0x00047B1C);
  }
  scePaf_E305A594 (var3, "page_info");
  var6 = *((int *) 0x00047B20);
  var7 = *((int *) 0x00047B1C);
  ((char *) var6)[276] = 0x00000000;
  var10 = scePaf_11FA6015 (var7, "page_optionmenu");
  sub_266CC (var10);
  var13 = *((int *) 0x00047B20);
  var16 = sub_21E8C (var13, 0x00000000);
  ra = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026164
 */
void sub_26164 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  scePaf_6439FDBC (arg1, 0x00000000, 0x00000014);
  var3 = sp;
  ((int *) sp)[0] = arg1;
  var6 = IoFileMgrForUser_54F5FB11 ("ms0:", 0x02425818, var3, 0x00000004, 0x00000000, 0x00000000);
  ra = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000261C4
 */
void sub_261C4 (int arg1, int arg2)
{
  var1 = 0xFFFFFBDB;
  if (!(arg1 == 0x00000000))
  {
    var2 = ((int *) arg1)[3];
    var3 = ((int *) arg1)[4];
    var4 = ((int *) arg1)[0];
    var1 = 0x00000000;
    var5 = (var3 * var2);
    ((int *) arg2)[0] = ((((((var4 < 0x00000002))) ? 0x00000000 : (var4 + 0xFFFFFFFE)) * ((var5 + ((var5 >> 0x0000001F) >> 0x00000019)) >> 0x00000007)) >> 0x00000003);
  }
  return;
}

/**
 * Subroutine at address 0x0002621C
 */
void sub_2621C (int arg1, int arg2)
{
  var1 = 0xFFFFFBDB;
  if (!(arg1 == 0x00000000))
  {
    var2 = ((int *) arg1)[3];
    var3 = ((int *) arg1)[4];
    var4 = ((int *) arg1)[1];
    var1 = 0x00000000;
    var5 = (var3 * var2);
    ((int *) arg2)[0] = ((((((var4 < 0x00000002))) ? 0x00000000 : (var4 + 0xFFFFFFFE)) * ((var5 + ((var5 >> 0x0000001F) >> 0x00000019)) >> 0x00000007)) >> 0x00000003);
  }
  return;
}

/**
 * Subroutine at address 0x00026274
 */
void sub_26274 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  scePaf_CA38E212 (arg1, 0x00080003, 0x00026318, 0x00000000);
  scePaf_CA38E212 (arg1, 0x00010001, 0x00026490, 0x00000000);
  var5 = *((int *) 0x00047B20);
  var6 = ((int *) var5)[652];
  if (var6 != 0x00000000)
  {
    var9 = *((int *) 0x00047B1C);
    var12 = scePaf_D27A723F (var9, "mlist_optionmenu");
    if (var12 == 0x00000000)
    {

    label15:
      ra = ((int *) sp)[2];
    }
    else
    {
      var13 = *((int *) 0x00047B20);
      var16 = sub_1B88C (var13);
      scePaf_509AB414 (var12, var16);
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label15;
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026318
 */
void sub_26318 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  var2 = ((int *) var1)[653];
  ((char *) var1)[275] = 0x00000001;
  if (var2 != 0x00000000)
  {
    vsh_794760F5 (var2, 0x00000000, 0x00000000);
    var24 = *((int *) 0x00047B20);
    __asm__ ("mtc1       $zr, $fpr13;");
    var25 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    var26 = ((int *) var24)[653];
    vsh_DD78EFF5 (var26);
    var29 = *((int *) 0x00047B20);
    var30 = ((int *) var29)[653];
    vsh_794760F5 (var30, 0x0002059C, var29);
    var1 = *((int *) 0x00047B20);
  }
  var3 = ((int *) var1)[883];
  var4 = ((int *) var3)[4];
  var7 var8 = (*var4) (0x00000007, 0x00000000, 0x00000000, var1, arg5, arg6, arg7, arg8);
  var9 = *((int *) 0x00047B20);
  var12 = sub_1B644 (var9);
  var13 = var12;
  var14 = *((int *) 0x00048F14);
  ra = ((int *) sp)[1];
  if (!(var14 == var13))
  {
    var15 = *((int *) 0x00047B20);
    *((int *) 0x00048F14) = var13;
    var18 = sub_1B88C (var15);
    sceVshCommonGui_6AA43E1C (var18);
    ra = ((int *) sp)[1];
  }
  var21 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000263D4
 */
void sub_263D4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) != 0x00000000)
  {

  label15:
    ra = ((int *) sp)[2];
  }
  else
  {
    var2 = *((int *) 0x00047B20);
    var3 = ((int *) var2)[70];
    if (!(var3 <= 0))
      goto label15;
    var6 = ((int *) var2)[651];
    scePaf_F1F9D49A (var6, "snd_cancel");
    var9 = *((int *) 0x00047B20);
    __asm__ ("mtc1       $zr, $fpr13;");
    var10 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    var11 = ((int *) var9)[653];
    if (var11 != 0x00000000)
    {
      vsh_B2284A12 (var11);
      var9 = *((int *) 0x00047B20);
    }
    var12 = *((int *) 0x00047B1C);
    ((char *) var9)[275] = 0x00000000;
    var13 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    sceVshCommonGui_69A07897 (var12, "page_optionmenu", 0x00000000);
    var16 = *((int *) 0x00047B1C);
    scePaf_3C8DD7F0 (var16, "page_topmenu");
    ra = ((int *) sp)[2];
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026490
 */
void sub_26490 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) != 0x00000000)
  {
    ra = ((int *) sp)[2];
  }
  else
  {
    var2 = var1 & 0x000000FF;
    if (var2 == 0x00000007)
    {

    label8:
      var5 = *((int *) 0x00047B20);
      var6 = ((int *) var5)[70];
      ra = ((int *) sp)[2];
      if (!(var6 > 0))
      {
        var9 = sub_1B644 (var5);
        var10 = var9;
        if (var9 == 0x00000000)
        {

        label28:
          ra = ((int *) sp)[2];
        }
        else
        {
          var11 = ((int *) var9)[6];
          var12 = *((int *) 0x00047B20);
          if (var11 < 0)
            goto label28;
          var13 = ((unsigned char *) var10)[28];
          var14 = ((int *) var12)[652];
          var15 = ((int *) var14)[206];
          ((int *) ((var15 << 0x00000002) + var12))[80] = 0x00000000;
          if (!(var13 == 0x00000000))
          {
            var16 = ((int *) var10)[0];
            if (var16 == 0x0000000D)
            {
              var30 = ((int *) var12)[651];
              scePaf_F1F9D49A (var30, "snd_category_decide");
            }
          }
          var17 = *((int *) 0x00047B20);
          sub_1F268 (var17);
          var20 = *((int *) 0x00047B20);
          var23 = sub_1B71C (var20);
          var24 = *((int *) 0x00047B20);
          var27 = sub_1B7D4 (var24);
          sub_12674 (var23, var27);
          ra = ((int *) sp)[2];
        }
      }
    }
    else
    {
      if (var2 == 0x00000050)
        goto label8;
      goto label28;
    }
  }
  var3 = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026580
 */
void sub_26580 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = ra;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  ((int *) sp)[8] = s0;
  var2 = ((int *) arg2)[3];
  var3 = *((int *) 0x00047B20);
  var6 = sub_1BAA0 (var3);
  var7 = *((int *) 0x00047B1C);
  var10 = scePaf_970DC20D (var7, (var6 + (((var2 << 0x00000004) - var2) << 0x00000002)));
  var11 = sp;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_33618 (var11, var10);
  var14 = ((int *) var1)[0];
  var15 = ((int *) var14)[45];
  var16 = sp;
  var19 var20 = (*var15) (var1, var16, ((var2 << 0x00000010) | 0x000000C8));
  var21 = sp;
  sub_335E8 (var21);
  ra = ((int *) sp)[10];
  var24 = ((int *) sp)[9];
  var25 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002661C
 */
void sub_2661C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var2 = ((int *) var1)[70];
  if (var2 <= 0)
  {
    var8 = sub_1B644 (var1);
    var9 = ((int *) arg2)[3];
    var10 = *((int *) 0x00047B20);
    var13 = sub_1B96C (var10, var8, var9);
    var14 = var13;
    if (var13 == 0x00000000)
    {

    label18:
      ra = ((int *) sp)[3];
    }
    else
    {
      var15 = ((int *) var13)[14];
      if (var15 == 0xFFFFFFFF)
        goto label18;
      var16 = ((unsigned char *) var14)[48];
      if (var16 != 0x00000000)
      {
        var24 = *((int *) 0x00047B20);
        var25 = ((int *) var24)[651];
        scePaf_F1F9D49A (var25, "snd_decide");
      }
      var17 = *((int *) 0x00047B20);
      sub_1F268 (var17);
      var20 = ((int *) var14)[14];
      var21 = ((int *) var14)[13];
      sub_12674 (var21, var20);
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label18;
  var3 = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000266CC
 */
void sub_266CC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = *((int *) 0x00047B20);
  ((int *) sp)[2] = ra;
  var5 = sub_21E8C (var2, 0x00000001);
  var6 = *((int *) 0x00047B1C);
  var7 = 0x42C80000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x42C80000));
  sceVshCommonGui_69A07897 (var6, "page_optionmenu", 0x00000000);
  var12 = scePaf_ED055C3C (var1, 0x0000007C);
  if ((var12 & 0x000000FF) != 0x00000000)
  {
    var18 = *((int *) 0x00047B20);
    var21 = sub_21E8C (var18, 0x00000000);
  }
  else
  {
  }
  var13 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  scePaf_DE0E0F8B (var1, 0x0000007C, 0x0002676C, 0x00000000);
  ra = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002676C
 */
void sub_2676C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  __asm__ ("mtc1       $zr, $fpr12;");
  var1 = *((int *) 0x00047B20);
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr13, $fpr12;");
  var2 = ((int *) var1)[653];
  ((char *) var1)[275] = 0x00000000;
  if (var2 != 0x00000000)
  {
    vsh_B2284A12 (var2);
    var1 = *((int *) 0x00047B20);
  }
  var3 = ((unsigned char *) var1)[272];
  var4 = *((int *) 0x00047B20);
  if (!(var3 == 0x00000000))
  {
    var5 = ((unsigned char *) var1)[273];
    if (var5 == 0x00000000)
    {
      var11 = *((int *) 0x00047B1C);
      scePaf_3C8DD7F0 (var11, "page_topmenu");
      var14 = *((int *) 0x00047B20);
    }
    else
    {
      var6 = *((int *) 0x00047B20);
    }
  }
  var9 = sub_21E8C (var6, 0x00000000);
  ra = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000267F4
 */
void sub_267F4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg1 == 0x00000000)
  {

  label8:
    var11 = 0x00000000;
  }
  else
  {
    var4 = scePaf_86AC3945 ();
    var5 = ((int *) var1)[0];
    var6 = ((int *) var5)[0];
    var9 var10 = (*var6) (var1, var4);
    var11 = var1;
    if (!(var9 != 0x00000000))
      goto label8;
  }
  if (!(var11 == 0x00000000))
  {
    scePaf_58A2087F (var11, 0x00000004);
  }
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026854
 */
void sub_26854 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00048F18);
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  *((char *) 0x00048FEC) = 0x00000000;
  var4 = scePaf_D27A723F (var1, "wallpaper_theme_plane");
  var5 = var4;
  if (!(var4 == 0x00000000))
  {
    var6 = ((int *) var4)[0];
    var7 = ((int *) var6)[28];
    var10 var11 = (*var7) (var4, 0x00000019, 0x00000003);
    var12 = ((int *) var5)[0];
    var13 = ((int *) var12)[28];
    var16 var17 = (*var13) (var5, 0x00000007, 0x00000010);
  }
  var18 = *((int *) 0x00048F18);
  var21 = scePaf_D27A723F (var18, "wallpaper_theme_cover");
  var22 = var21;
  if (!(var21 == 0x00000000))
  {
    var23 = ((int *) var21)[0];
    var24 = ((int *) var23)[28];
    var27 var28 = (*var24) (var21, 0x00000019, 0x0000000A);
    ((char *) var22)[509] = 0x00000000;
    ((char *) var22)[510] = 0x00000000;
    scePaf_44653A84 (var22);
  }
  ra = ((int *) sp)[2];
  var31 = ((int *) sp)[1];
  var32 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026914
 */
void sub_26914 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var3 = scePaf_48BB05D5 (0x00000330);
  scePaf_4A2B8028 (var3, arg1, 0x00000000);
  sub_318F0 ((var3 + 0x00000004), "swave_theme");
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002696C
 */
void sub_2696C ()
{
  var1 = *((int *) 0x00048F1C);
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_E305A594 (var1, "page_infobar");
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026994
 */
void sub_26994 (int arg1)
{
  sp = sp + 0xFFFFFEE0;
  ((int *) sp)[64] = s0;
  var1 = sp + 0x000000D0;
  ((int *) sp)[66] = s2;
  var2 = arg1;
  ((int *) sp)[65] = s1;
  ((int *) sp)[69] = s5;
  ((int *) sp)[68] = s4;
  ((int *) sp)[67] = s3;
  ((int *) sp)[70] = ra;
  scePaf_BC8DC92B (var1);
  var5 = ((unsigned short *) sp)[105];
  var6 = *((unsigned short *) 0x00048F76);
  if (var5 == var6)
  {
    var37 = *((int *) 0x00048F78);
    var38 = ((int *) sp)[53];
    if (var38 != var37)
    {

    label16:
      var7 = *((int *) 0x00000004);

    label17:
      if (var7 < 0)
      {

      label31:
      }
      else
      {
        if (((var7 < 0x00000002)) != 0x00000000)
        {
          var36 = *((int *) 0x00000000);
          if (var36 == 0x00000000)
          {
            goto label31;
          }
          else
          {
            if (var36 != 0x00000001)
            {
            }
            else
            {
              goto label31;
            }
          }
        }
        else
        {
          var8 = *((int *) 0x00000000);
          if (!(var7 == 0x00000002))
            goto label31;
          if (var8 == 0x00000000)
          {
            goto label31;
          }
          else
          {
            if (var8 != 0x00000001)
            {
            }
            else
            {
              goto label31;
            }
          }
        }
      }
      var9 = sp;
      scePaf_A9FC7990 (var1, var9, 0x00000064, 0x00039C08);
      var12 = sp + 0x000000E0;
      var13 = sp;
      ((int *) sp)[56] = 0x00000000;
      ((int *) sp)[57] = 0x00000000;
      sub_33618 (var12, var13);
      var16 = ((int *) var2)[0];
      var17 = ((int *) var16)[45];
      var20 var21 = (*var17) (var2, var12, 0x00000000);
      sub_335E8 (var12);
      var24 = *((int *) 0x00000004);
      var25 = *((int *) 0x00000000);
      var26 = ((int *) sp)[52];
      var27 = ((int *) sp)[53];
      var28 = ((int *) sp)[54];
      var29 = ((int *) sp)[55];
      *((int *) 0x00048F74) = var26;
      *((int *) 0x00048F80) = var29;
      *((int *) 0x00048F84) = var24;
      *((int *) 0x00048F88) = var25;
      *((int *) 0x00048F78) = var27;
      *((int *) 0x00048F7C) = var28;
      ra = ((int *) sp)[70];
    }
    else
    {
      var39 = *((unsigned short *) 0x00048F7C);
      var40 = ((unsigned short *) sp)[108];
      if (var40 != var39)
      {
        goto label16;
      }
      else
      {
        var7 = *((int *) 0x00000004);
        var41 = *((int *) 0x00048F84);
        if (var7 != var41)
        {
          goto label17;
        }
        else
        {
          var42 = *((int *) 0x00000000);
          var43 = *((int *) 0x00048F88);
          if (var42 != var43)
          {
            goto label16;
          }
          else
          {
            ra = ((int *) sp)[70];
          }
        }
      }
    }
  }
  else
  {
    goto label16;
  }
  var30 = ((int *) sp)[69];
  var31 = ((int *) sp)[68];
  var32 = ((int *) sp)[67];
  var33 = ((int *) sp)[66];
  var34 = ((int *) sp)[65];
  var35 = ((int *) sp)[64];
  sp = sp + 0x00000120;
  return;
}

/**
 * Subroutine at address 0x00026B58
 */
void sub_26B58 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x00048F68);
  __asm__ ("swc1       $fpr23, 44($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr22, 40($sp);"
    : 
    : "=r"(sp));
  var2 = 0x3D088889;
  __asm__ ("mtc1       $at, $fpr23;"
    : 
    : "=r"(0x3D088889));
  var3 = 0x3F000000;
  __asm__ ("mtc1       $at, $fpr22;"
    : 
    : "=r"(0x3F000000));
  var4 = (((hi (var1 * 0x88888889)) + var1) >> 0x00000004) - (var1 >> 0x0000001F);
  var5 = var1 - (((var4 << 0x00000004) - var4) << 0x00000001);
  __asm__ ("mtc1       $a1, $fpr0;"
           "swc1       $fpr21, 36($sp);"
    : 
    : "=r"(var5), "=r"(sp));
  __asm__ ("cvt.s.w    $fpr01, $fpr00;"
           "mtc1       $v1, $fpr0;"
           "swc1       $fpr20, 32($sp);"
           "cvt.s.w    $fpr02, $fpr00;"
    : 
    : "=r"(var4), "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("mul.s      $fpr21, $fpr01, $fpr23;"
           "mul.s      $fpr20, $fpr02, $fpr22;");
  var6 = ((int *) arg1)[0];
  __asm__ ("swc1       $fpr22, 8($sp);"
           "swc1       $fpr23, 12($sp);"
           "swc1       $fpr20, 0($sp);"
           "swc1       $fpr21, 4($sp);"
    : 
    : "=r"(sp));
  var7 = ((int *) var6)[30];
  var8 = sp;
  var11 var12 = (*var7) (arg1, 0x00000017, var8, var6, arg5, arg6, arg7, arg8);
  var13 = *((int *) 0x00048FB4);
  var14 = sp;
  if (var13 != 0x00000000)
  {
    var18 = ((int *) var13)[0];
    __asm__ ("swc1       $fpr20, 0($sp);"
             "swc1       $fpr21, 4($sp);"
             "swc1       $fpr22, 8($sp);"
             "swc1       $fpr23, 12($sp);"
      : 
      : "=r"(sp));
    var19 = ((int *) var18)[30];
    var22 var23 = (*var19) (var13, 0x00000017, var14);
    var15 = *((int *) 0x00048F68);
  }
  else
  {
    var15 = *((int *) 0x00048F68);
  }
  ra = ((int *) sp)[5];
  __asm__ ("lwc1       $fpr23, 44($sp);");
  var16 = var15 + 0x00000001;
  *((int *) 0x00048F68) = (!(((var16 < 0x0000003C))) ? 0x00000000 : var16);
  __asm__ ("lwc1       $fpr22, 40($sp);");
  var17 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00026C70
 */
void sub_26C70 ()
{
  sp = sp + 0xFFFFFFD0;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var1 = sp;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[4] = s0;
  var2 = *((int *) 0x00048FA8);
  var3 = ((unsigned char *) var2)[509];
  if (var3 != 0x00000000)
  {
    var5 = 0x42F80000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 4($sp);"
      : 
      : "=r"(0x42F80000), "=r"(sp));
    var6 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr12, 0($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_07C50769 (var2, var1, 0x00000000);
    var11 = scePaf_ED055C3C (var2, 0x01000001);
    var12 = 0x40E00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "add.s      $fpr00, $fpr20, $fpr00;"
      : 
      : "=r"(0x40E00000));
    var13 = *((int *) 0x00048FAC);
    var14 = sp;
    __asm__ ("swc1       $fpr00, 0($sp);"
      : 
      : "=r"(sp));
    var15 = 0x42F40000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42F40000));
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var16 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_07C50769 (var13, var14, 0x00000000);
    var21 = scePaf_ED055C3C (var13, 0x01000001);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var4 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00026D44
 */
void sub_26D44 ()
{
  sp = sp + 0xFFFFFFD0;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var1 = sp;
  ((int *) sp)[5] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[4] = s0;
  var2 = *((int *) 0x00048FA0);
  var3 = ((unsigned char *) var2)[509];
  if (!(var3 == 0x00000000))
  {
    var4 = 0x42F80000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 4($sp);"
      : 
      : "=r"(0x42F80000), "=r"(sp));
    var5 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr12, 0($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_07C50769 (var2, var1, 0x00000000);
    var10 = scePaf_ED055C3C (var2, 0x01000001);
    var11 = 0x40E00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "add.s      $fpr00, $fpr20, $fpr00;"
      : 
      : "=r"(0x40E00000));
    var12 = *((int *) 0x00048FA4);
    var13 = sp;
    __asm__ ("swc1       $fpr00, 0($sp);"
      : 
      : "=r"(sp));
    var14 = 0x42F40000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42F40000));
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var15 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_07C50769 (var12, var13, 0x00000000);
    var20 = scePaf_ED055C3C (var12, 0x01000001);
    var21 = 0x41900000;
    __asm__ ("mtc1       $at, $fpr12;"
             "sub.s      $fpr12, $fpr20, $fpr12;"
      : 
      : "=r"(0x41900000));
  }
  sub_26C70 ();
  ra = ((int *) sp)[5];
  var24 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00026E24
 */
void sub_26E24 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[5] = s1;
  var1 = 0x42F60000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x42F60000));
  ((int *) sp)[4] = s0;
  var2 = sp;
  var3 = *((int *) 0x00048F9C);
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[6] = ra;
  __asm__ ("swc1       $fpr12, 0($sp);"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr20, 32($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[2] = 0x00000000;
  scePaf_07C50769 (var3, var2, 0x00000000);
  var9 = scePaf_ED055C3C (var3, 0x01000001);
  var10 = *((int *) 0x00048F9C);
  var11 = ((int *) var10)[0];
  ((int *) sp)[3] = 0x7F800001;
  ((int *) sp)[0] = 0x7F800001;
  ((int *) sp)[1] = 0x7F800001;
  ((int *) sp)[2] = 0x7F800001;
  var12 = ((int *) var11)[38];
  var13 = sp;
  var16 var17 = (*var12) (var10, 0x00000012, var13);
  __asm__ ("lwc1       $fpr00, 0($sp);");
  var18 = 0x40A00000;
  __asm__ ("mtc1       $at, $fpr1;"
           "sub.s      $fpr20, $fpr20, $fpr00;"
           "sub.s      $fpr20, $fpr20, $fpr01;"
    : 
    : "=r"(0x40A00000));
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_26D44 ();
  ra = ((int *) sp)[6];
  var21 = ((int *) sp)[5];
  var22 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00026EE8
 */
void sub_26EE8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x434B0000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x434B0000));
  var2 = *((int *) 0x00048F94);
  var3 = ((unsigned char *) var2)[509];
  if (!(var3 != 0x00000000))
  {
    var4 = 0x436B0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x436B0000));
  }
  sub_26E24 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026F28
 */
void sub_26F28 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_26EE8 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026F44
 */
void sub_26F44 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[14] = s2;
  ((int *) sp)[15] = ra;
  ((int *) sp)[13] = s1;
  ((int *) sp)[12] = s0;
  __asm__ ("swc1       $fpr21, 68($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr20, 64($sp);"
    : 
    : "=r"(sp));
  var3 = scePower_0AFD0D8B ();
  var4 = var3;
  if (var3 < 0)
  {

  label46:
    ra = ((int *) sp)[15];
  }
  else
  {
    var5 = *((int *) 0x00048F70);
    if (!(var4 == var5))
    {
      *((int *) 0x00048F70) = var4;
      if (var4 == 0x00000000)
      {
        var65 = *((int *) 0x00048F1C);
        var66 = *((int *) 0x00048F94);
        scePaf_5218E3CC (var65, var66);
        var69 = *((int *) 0x00048F94);
        *((int *) 0x00048F6C) = 0x00000000;
        ((char *) var69)[509] = 0x00000000;
        ((char *) var69)[510] = 0x00000000;
        scePaf_44653A84 (var69);
        var72 = *((int *) 0x00048F98);
        ((char *) var72)[509] = 0x00000000;
        ((char *) var72)[510] = 0x00000000;
      }
      else
      {
        var6 = *((int *) 0x00048F1C);
        var7 = *((int *) 0x00048F94);
        scePaf_5218E3CC (var6, var7);
        var10 = *((int *) 0x00048F94);
        *((int *) 0x00048F6C) = 0x00000000;
        ((char *) var10)[509] = 0x00000001;
        ((char *) var10)[510] = 0x00000001;
        scePaf_44653A84 (var10);
        var13 = *((int *) 0x00048F98);
        ((char *) var13)[510] = 0x00000001;
        ((char *) var13)[509] = 0x00000001;
      }
      scePaf_44653A84 (var13);
      sub_26EE8 ();
    }
    if (!(var4 != 0x00000000))
      goto label46;
    var23 = scePower_1E490401 ();
    var24 = var23;
    if (var23 < 0)
      goto label46;
    var25 = *((int *) 0x00048F6C);
    if (!(var24 == var25))
    {
      *((int *) 0x00048F6C) = var24;
      if (var24 == 0x00000000)
      {
        var63 = *((int *) 0x00048F1C);
        var64 = *((int *) 0x00048F94);
      }
      else
      {
        var26 = *((int *) 0x00048F1C);
        var27 = *((int *) 0x00048F94);
      }
      scePaf_5BC7BB59 (var26, var27, "anim_battery_charging");
    }
    var32 = scePower_2085D15D ();
    if (var32 < 0)
      goto label46;
    var33 = *((int *) 0x00039C7C);
    var34 = *((int *) 0x00039C88);
    var35 = *((int *) 0x00039C8C);
    var36 = *((int *) 0x00039C98);
    var37 = *((int *) 0x00039C80);
    var38 = *((int *) 0x00039C84);
    var39 = *((int *) 0x00039C90);
    var40 = *((int *) 0x00039C94);
    var41 = *((int *) 0x00048F6C);
    ((int *) sp)[0] = var33;
    var42 = sp;
    ((int *) sp)[1] = var37;
    ((int *) sp)[2] = var38;
    ((int *) sp)[3] = var34;
    ((int *) sp)[4] = var35;
    ((int *) sp)[5] = var39;
    ((int *) sp)[6] = var40;
    ((int *) sp)[7] = var36;
    if (!(var41 != 0x00000000))
    {
      var42 = sp + 0x00000010;
    }
    var43 = 0x00000000;
    var44 = ((int *) var42)[0];
    while (1) {
      var42 = var42 + 0x00000004;
      if (((var32 < var44)) == 0x00000000)
        break;
      var43 = var43 + 0x00000001;
      if (((var43 < 0x00000004)) != 0x00000000)
      {
        var44 = ((int *) var42)[0];
        continue;
      }
      else
      {
        ra = ((int *) sp)[15];
      }
      goto label47;
    }
    __asm__ ("mtc1       $a0, $fpr0;"
      : 
      : "=r"(var43));
    var45 = *((int *) 0x00048F94);
    __asm__ ("cvt.s.w    $fpr20, $fpr00;");
    var46 = 0x3E800000;
    __asm__ ("mtc1       $at, $fpr21;"
      : 
      : "=r"(0x3E800000));
    var47 = ((int *) var45)[0];
    var48 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mul.s      $fpr20, $fpr20, $fpr21;"
             "swc1       $fpr00, 40($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var49 = sp + 0x00000020;
    ((int *) sp)[8] = 0x00000000;
    __asm__ ("swc1       $fpr20, 36($sp);"
             "swc1       $fpr21, 44($sp);"
      : 
      : "=r"(sp));
    var50 = ((int *) var47)[30];
    var53 var54 = (*var50) (var45, 0x00000017, var49, var33, var34, var35, var36, var41);
    var55 = *((int *) 0x00048F98);
    var56 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr20, 36($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var57 = ((int *) var55)[0];
    __asm__ ("swc1       $fpr00, 40($sp);"
             "swc1       $fpr21, 44($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[8] = 0x00000000;
    var58 = ((int *) var57)[30];
    var61 var62 = (*var58) (var55, 0x00000017, var49);
    ra = ((int *) sp)[15];
  }

label47:
  var18 = ((int *) sp)[14];
  var19 = ((int *) sp)[13];
  var20 = ((int *) sp)[12];
  __asm__ ("lwc1       $fpr21, 68($sp);"
           "lwc1       $fpr20, 64($sp);");
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x000271D8
 */
void sub_271D8 ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  sceCtrl_3A622550 (var1, 0x00000001);
  var4 = ((int *) sp)[1];
  var5 = *((int *) 0x00048F8C);
  var6 = (var4 >> 17) & 0x00000001;
  if (!(var6 == var5))
  {
    *((int *) 0x00048F8C) = var6;
    if (var6 == 0x00000000)
    {
      var16 = *((int *) 0x00048FA8);
      ((char *) var16)[509] = 0x00000000;
      ((char *) var16)[510] = 0x00000000;
      scePaf_44653A84 (var16);
      var19 = *((int *) 0x00048FAC);
      ((char *) var19)[509] = 0x00000000;
      ((char *) var19)[510] = 0x00000000;
    }
    else
    {
      var7 = *((int *) 0x00048FA8);
      ((char *) var7)[509] = 0x00000001;
      ((char *) var7)[510] = 0x00000001;
      scePaf_44653A84 (var7);
      var10 = *((int *) 0x00048FAC);
      ((char *) var10)[510] = 0x00000001;
      ((char *) var10)[509] = 0x00000001;
    }
    scePaf_44653A84 (var10);
    sub_26EE8 ();
  }
  ra = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002728C
 */
void sub_2728C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  scePaf_BC8DC92B (var1);
  var4 = ((unsigned short *) sp)[1];
  ra = ((int *) sp)[4];
  *((int *) 0x00048F58) = var4;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000272B4
 */
void sub_272B4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[45] = s5;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[43] = s3;
  ((int *) sp)[40] = s0;
  var3 = arg3;
  ((int *) sp)[46] = ra;
  ((int *) sp)[44] = s4;
  ((int *) sp)[42] = s2;
  ((int *) sp)[41] = s1;
  sub_32328 (var2, 0x00000000);
  if (((var3 < 0x0000000C)) != 0x00000000)
  {
    var62 = sp + 0x00000010;
    var65 = IoFileMgrForUser_ACE946E8 (0x00039CF0, var62);
    if (var65 != 0x00000000)
    {
    }
    else
    {
    }

  label14:
    var25 = scePaf_269AC167 ("flash0:/vsh/resource/13-27.bmp", 0x00000000, 0x00000000, ((var3 * 0x00001820) + 0xFFFEDE80), 0x00001820);
    var26 = var25;
    if (var25 == 0x00000000)
    {

    label38:
      sub_32328 (var1, 0x00000000);
      var8 = ((int *) sp)[0];
    }
    else
    {
      var27 = ((int *) var25)[11];
      var28 = var25 + 0x0000002C;
      ((int *) sp)[32] = var27;
      var29 = ((int *) var28)[1];
      ((int *) sp)[28] = var27;
      ((int *) sp)[29] = var29;
      ((int *) sp)[33] = var29;
      var32 var33 = scePaf_0A6D0925 (var25, 0x00000001);
      ((int *) sp)[37] = var33;
      var34 = ((unsigned short *) var28)[36];
      ((int *) sp)[36] = var32;
      var37 = scePaf_64A8F0B9 (0x00000068);
      var38 = ((int *) var28)[14];
      var39 = ((int *) sp)[28];
      var40 = ((int *) sp)[29];
      scePaf_A0E3AAE0 (var37, arg2, var39, var40, var38, 0x00000002, 0x00000000, 0x00000001);
      var43 = sp;
      sub_32448 (var43, var37);
      var46 = ((int *) sp)[0];
      var47 = ((int *) sp)[28];
      var48 = ((int *) var28)[15];
      var51 = scePaf_336E37F3 (var46, var47);
      if (var34 == 0x00000000)
      {
        __asm__ ("break      0x00007;");
      }
      var52 = ((int *) sp)[36];
      scePaf_6D03433C (var46, 0x00000000, var52, var48, ((((var51 + var34) + 0xFFFFFFFF) / var34) * var34));
      scePaf_94E322DD (var26);
      scePaf_4508F2FA (var26);
      var59 = sp;
      sub_32408 (var1, var59);
      var8 = ((int *) sp)[0];
    }
  }
  else
  {
    if (!(((var3 < 0x0000000C)) == 0x00000000))
      goto label38;
    goto label14;
  }
  if (!(var8 == 0x00000000))
  {
    var9 = ((int *) var8)[1];
    var10 = var9 + 0xFFFFFFFF;
    ((int *) var8)[1] = var10;
    if (var10 <= 0)
    {
      var17 = ((int *) var8)[0];
      var18 = ((int *) var17)[1];
      var21 var22 = (*var18) (var8);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[46];
  var11 = ((int *) sp)[45];
  var12 = ((int *) sp)[44];
  var13 = ((int *) sp)[43];
  var14 = ((int *) sp)[42];
  var15 = ((int *) sp)[41];
  var16 = ((int *) sp)[40];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x000274B8
 */
void sub_274B8 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  *((int *) 0x00048F34) = arg1;
  *((int *) 0x00048F38) = arg2;
  *((int *) 0x00048F3C) = arg3;
  *((int *) 0x00048F40) = arg4;
  *((int *) 0x00048F44) = arg5;
  return;
}

/**
 * Subroutine at address 0x000274E4
 */
void sub_274E4 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  if (!(arg1 == 0x00000000))
  {
    var1 = *((int *) 0x00048F34);
    ((int *) arg1)[0] = var1;
  }
  if (!(arg2 == 0x00000000))
  {
    var2 = *((int *) 0x00048F38);
    ((int *) arg2)[0] = var2;
  }
  if (!(arg3 == 0x00000000))
  {
    var3 = *((int *) 0x00048F3C);
    ((int *) arg3)[0] = var3;
  }
  if (!(arg4 == 0x00000000))
  {
    var4 = *((int *) 0x00048F40);
    ((int *) arg4)[0] = var4;
  }
  if (!(arg5 == 0x00000000))
  {
    var5 = *((int *) 0x00048F44);
    ((int *) arg5)[0] = var5;
  }
  return;
}

/**
 * Subroutine at address 0x0002753C
 */
void sub_2753C ()
{
  sp = sp + 0xFFFFF820;
  ((int *) sp)[502] = ra;
  var1 = 0x00039D34;
  var2 = sp;
  ((int *) sp)[501] = s1;
  ((int *) sp)[500] = s0;
  while (1) {
    var3 = ((int *) var1)[0];
    var4 = ((int *) var1)[1];
    var5 = ((int *) var1)[2];
    var6 = ((int *) var1)[3];
    ((int *) var2)[0] = var3;
    var1 = var1 + 0x00000010;
    var2 = var2 + 0x00000010;
    ((int *) var2)[1073741821] = var4;
    ((int *) var2)[1073741822] = var5;
    ((int *) var2)[1073741823] = var6;
    if (var1 != 0x0003A4F4)
      continue;
    break;
  }
  var9 = sub_28864 ();
  var10 = *((unsigned char *) 0x00048FED);
  var11 = sp + 0x000007C0;
  var12 = (0x00000000 < var10);
  var13 = ((((var12 << 0x00000005) - var12) + var9) << 0x00000005) + sp;
  __asm__ ("lwc1       $fpr00, 0($s0);"
           "lwc1       $fpr01, 4($s0);"
           "lwc1       $fpr02, 8($s0);"
           "lwc1       $fpr03, 12($s0);");
  __asm__ ("swc1       $fpr00, 1984($sp);"
           "swc1       $fpr01, 1988($sp);"
           "swc1       $fpr02, 1992($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr03, 1996($sp);"
    : 
    : "=r"(sp));
  sub_29208 (0x00000034, var11);
  __asm__ ("lwc1       $fpr03, 28($s0);"
           "lwc1       $fpr00, 16($s0);"
           "lwc1       $fpr01, 20($s0);"
           "lwc1       $fpr02, 24($s0);");
  __asm__ ("swc1       $fpr00, 1984($sp);"
           "swc1       $fpr01, 1988($sp);"
           "swc1       $fpr02, 1992($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr03, 1996($sp);"
    : 
    : "=r"(sp));
  sub_29208 (0x00000035, var11);
  ra = ((int *) sp)[502];
  var18 = ((int *) sp)[501];
  var19 = ((int *) sp)[500];
  sp = sp + 0x000007E0;
  return;
}

/**
 * Subroutine at address 0x00027620
 */
void sub_27620 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s6;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  ((int *) sp)[16] = s0;
  ((int *) sp)[23] = ra;
  ((int *) sp)[21] = s5;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  scePaf_BD500444 (0x00000000);
  var3 = *((int *) 0x00048FE4);
  if (var3 == 0x00000000)
  {

  label8:
    var5 = *((int *) 0x00048F24);
    if (var5 != 0x00000000)
    {
      var7 = *((int *) 0x00048F28);
    }
    else
    {
      var6 = *((int *) 0x00048F58);
      var7 = var6 + 0xFFFFFFFF;
    }
    var8 = *((int *) 0x00048F18);
    var9 = sp + 0x00000010;
    var10 = ((int *) var8)[103];
    sub_272B4 (var9, var10, var7);
    var13 = ((int *) sp)[4];
    sub_32448 (0x00048FE4, var13);
    var16 = ((int *) sp)[4];
    var17 = sp + 0x00000020;
    if (!(var16 == 0x00000000))
    {
      var18 = ((int *) var16)[1];
      var19 = var18 + 0xFFFFFFFF;
      ((int *) var16)[1] = var19;
      if (var19 <= 0)
      {
        var107 = ((int *) var16)[0];
        var108 = ((int *) var107)[1];
        var111 var112 = (*var108) (var16);
        var17 = sp + 0x00000020;
      }
      else
      {
        var17 = sp + 0x00000020;
      }
    }
  }
  else
  {
    if ((arg1 & 0x000000FF) == 0x00000000)
    {
      var17 = sp + 0x00000020;
    }
    else
    {
      var4 = sp + 0x00000020;
      goto label8;
    }
  }
  var20 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  var21 = sp + 0x00000024;
  var22 = sp + 0x00000028;
  __asm__ ("swc1       $fpr00, 32($sp);"
           "swc1       $fpr00, 36($sp);"
           "swc1       $fpr00, 40($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 44($sp);"
    : 
    : "=r"(sp));
  sub_287A8 (var17, var21, var22, 0x00000000);
  scePaf_E9DBEA88 (var17);
  var27 = *((unsigned char *) 0x00048F2C);
  if (var27 == 0x00000000)
  {
    var37 = *((int *) 0x00048F18);
    scePaf_E305A594 (var37, "page_wallpaper_theme");
    var40 = *((int *) 0x00048F18);
    scePaf_27F4E35C (var40, "page_default_theme", 0x00000001, 0x00000000);
    var43 = *((int *) 0x00048F18);
    if ((arg2 & 0x000000FF) != 0x00000000)
    {
      scePaf_E305A594 (var43, "page_default_theme_3D");
      var104 = *((int *) 0x00048F18);
      scePaf_E305A594 (var104, "page_default_theme2_3D");
      var44 = *((int *) 0x00048F30);
    }
    else
    {
      var44 = *((int *) 0x00048F30);
    }
    var45 = *((int *) 0x00048F18);
    if (var44 == 0x00000000)
    {
      scePaf_27F4E35C (var45, "page_default_theme2_3D", 0x00000001, 0x00000000);
      sub_2753C ();
    }
    else
    {
      if (var44 == 0x00000001)
      {
        scePaf_27F4E35C (var45, "page_default_theme_3D", 0x00000001, 0x00000000);
      }
      else
      {
      }
    }
    var46 = *((int *) 0x00048F30);
    if (var46 == 0x00000000)
    {
      var89 = *((int *) 0x00048F18);
      var92 = scePaf_11FA6015 (var89, "page_default_theme2_3D");
      var95 = scePaf_E05C0B73 (var92, 0x00000000);

    label66:
      scePaf_CCC82881 (var66, 0x00000001);
      var79 = *((int *) 0x00048F18);
      var82 = scePaf_11FA6015 (var79, "page_default_theme");
      var85 = scePaf_E05C0B73 (var82, 0x00000000);
      scePaf_CCC82881 (var85, 0x00000001);
      var88 = *((int *) 0x00048F18);
    }
    else
    {
      var47 = *((int *) 0x00048F18);
      if (var46 == 0x00000001)
      {
        var59 = scePaf_11FA6015 (var47, "page_default_theme_3D");
        var62 = scePaf_E05C0B73 (var59, 0x00000000);
        var63 = 0x436C0000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x436C0000));
        var64 = sp + 0x00000030;
        __asm__ ("swc1       $fpr00, 56($sp);"
          : 
          : "=r"(sp));
        var65 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var66 = var62;
        __asm__ ("swc1       $fpr00, 60($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        scePaf_07C50769 (var62, var64, 0x00000000);
        var71 = scePaf_ED055C3C (var66, 0x01000001);
        var72 = 0x43F00000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43F00000));
        var73 = 0x43880000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43880000));
        var74 = 0x436C0000;
        __asm__ ("mtc1       $at, $fpr14;"
          : 
          : "=r"(0x436C0000));
        scePaf_56D1B0AA (var66);
        goto label66;
      }
    }
    var50 = scePaf_D27A723F (var47, "default_theme_plane");
    var51 = ((int *) var50)[0];
    var52 = ((int *) var51)[43];
    var55 var56 = (*var52) (var50, 0x00048FE4, 0x00000000);
  }
  scePaf_6BEF472A (0x00000000);
  ra = ((int *) sp)[23];
  var30 = ((int *) sp)[22];
  var31 = ((int *) sp)[21];
  var32 = ((int *) sp)[20];
  var33 = ((int *) sp)[19];
  var34 = ((int *) sp)[18];
  var35 = ((int *) sp)[17];
  var36 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0002792C
 */
void sub_2792C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x00048F24) = 0x00000000;
  sub_2728C ();
  sub_27620 (0x00000001, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00027958
 */
void sub_27958 (int arg1)
{
  *((int *) 0x00048F28) = arg1;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x00048F24) = 0x00000001;
  sub_27620 (0x00000001, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00027990
 */
void sub_27990 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00048F3C);
  if (var1 != 0x00000000)
  {
    var5 = *((int *) 0x00048F44);
    var8 var9 = (*var5) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[3];
    if (!(var8 == 0x00000000))
    {
      var10 = *((int *) 0x00048F50);
      if (var10 == 0x00000000)
      {
        var18 = *((int *) 0x00048F48);
        var19 = *((int *) 0x00048F3C);
        var22 var23 = (*var19) (var18);
        *((int *) 0x00048F50) = var22;
      }
      else
      {
      }
      var11 = *((int *) 0x00048F54);
      if (!(var11 != 0x00000000))
      {
        var14 = scePaf_48BB05D5 (0x0000003C);
        var15 = *((int *) 0x00048F50);
        scePaf_E81F861B (var14, var15, 0x00084800, 0x00000000);
        *((int *) 0x00048F54) = var14;
      }

    label18:
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label18;
  var2 = ((int *) sp)[2];
  var3 = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00027A40
 */
void sub_27A40 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = *((int *) 0x00048F40);
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s0;
  if (var1 != 0x00000000)
  {
    var4 = *((int *) 0x00048F18);
    var7 = scePaf_D27A723F (var4, "wallpaper_theme_plane");
    var8 = var7;
    if (var7 == 0x00000000)
    {

    label18:
    }
    else
    {
      ((char *) var7)[509] = 0x00000000;
      ((char *) var7)[510] = 0x00000000;
      scePaf_44653A84 (var7);
      var11 = sp;
      sub_32328 (var11, 0x00000000);
      var14 = ((int *) var8)[0];
      var15 = sp;
      var16 = ((int *) var14)[43];
      var19 var20 = (*var16) (var8, var15, 0x00000000);
      var21 = ((int *) sp)[0];
      if (var21 == 0x00000000)
      {
      }
      else
      {
        var22 = ((int *) var21)[1];
        var23 = var22 + 0xFFFFFFFF;
        ((int *) var21)[1] = var23;
        if (!(var23 <= 0))
          goto label18;
        var40 = ((int *) var21)[0];
        var41 = ((int *) var40)[1];
        var44 var45 = (*var41) (var21);
      }
    }
    sub_32448 (0x00048FE8, 0x00000000);
    var26 = *((int *) 0x00048F54);
    if (var26 != 0x00000000)
    {
      var34 = ((int *) var26)[0];
      var35 = ((int *) var34)[1];
      var38 var39 = (*var35) (var26);
    }
    else
    {
    }
    var27 = *((int *) 0x00048F48);
    *((int *) 0x00048F54) = 0x00000000;
    if (var27 == 0x00000000)
    {

    label32:
      ra = ((int *) sp)[6];
    }
    else
    {
      var28 = *((int *) 0x00048F50);
      ra = ((int *) sp)[6];
      if (!(var28 == 0x00000000))
      {
        var29 = *((int *) 0x00048F40);
        var32 var33 = (*var29) (var27);
        *((int *) 0x00048F50) = 0x00000000;
        goto label32;
      }
    }
  }
  else
  goto label32;
  var2 = ((int *) sp)[5];
  var3 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00027B5C
 */
void sub_27B5C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((char *) 0x00048FEC) = 0x00000000;
  sub_27A40 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00027B7C
 */
void sub_27B7C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((unsigned char *) 0x00048F2C);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    var12 = sub_27C9C (0x00000001, var1, 0x00000000);
    var2 = *((unsigned char *) 0x00048F2D);
  }
  else
  {
    var2 = *((unsigned char *) 0x00048F2D);
  }
  if (var2 != 0x00000000)
  {
    sub_27C60 ();
    sub_27BFC ();
    sub_27990 ();
    *((char *) 0x00048FEC) = 0x00000001;
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00027BFC
 */
void sub_27BFC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00048F34);
  if (!(var1 == 0x00000000))
  {
    var2 = *((int *) 0x00048F48);
    if (!(var2 != 0x00000000))
    {
      var3 = *((unsigned char *) 0x00048F4C);
      var6 var7 = (*var1) (0x00084800, 0x00027B5C, 0x00027B7C, (((0x00000000 < var3)) | 0x00000002), arg5, arg6, arg7, arg8);
      *((int *) 0x00048F48) = var6;
    }
  }
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00027C60
 */
void sub_27C60 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00048F38);
  if (var1 != 0x00000000)
  {
    var3 = *((int *) 0x00048F48);
    var6 var7 = (*var1) (var3, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    *((int *) 0x00048F48) = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00027C9C
 */
int sub_27C9C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[80] = fp;
  var1 = 0x00000000;
  ((int *) sp)[75] = s3;
  var2 = arg3;
  ((int *) sp)[81] = ra;
  ((int *) sp)[79] = s7;
  ((int *) sp)[78] = s6;
  ((int *) sp)[77] = s5;
  ((int *) sp)[76] = s4;
  ((int *) sp)[74] = s2;
  ((int *) sp)[73] = s1;
  ((int *) sp)[72] = s0;
  ((int *) sp)[61] = (arg2 & 0x000000FF);
  ((int *) sp)[62] = 0x00000000;
  ((int *) sp)[63] = 0x00000000;
  ((int *) sp)[64] = 0x00000000;
  ((int *) sp)[65] = 0x00000000;
  if ((arg1 & 0x000000FF) == 0x00000000)
  {

  label52:
    scePaf_BD500444 (0x00000000);
    var5 = ((int *) sp)[61];
    if (!(var2 == 0x00000000))
    {
      sub_27A40 ();
      sub_27C60 ();
      sub_27BFC ();
      sub_27990 ();
      var14 = *((int *) 0x00048F54);
      if (var14 != 0x00000000)
      {
        var93 = ((int *) sp)[61];
        var94 = ((int *) var2)[11];
        var95 = var2 + 0x0000002C;
        ((int *) sp)[52] = var94;
        var96 = ((int *) var95)[1];
        ((int *) sp)[48] = var94;
        ((int *) sp)[49] = var96;
        ((int *) sp)[53] = var96;
        var99 var100 = scePaf_0A6D0925 (var2, 0x00000001);
        var101 = ((int *) var95)[15];
        ((int *) sp)[40] = var99;
        ((int *) sp)[41] = var100;
        var102 = ((unsigned short *) var95)[36];
        if (var101 == 0x00000001)
        {
          var124 = ((int *) var95)[14];
          if (var124 == 0x00000004)
          {

          label104:
            var105 = scePaf_64A8F0B9 (0x00000068);
            var106 = ((int *) var95)[14];
            var107 = ((int *) sp)[48];
            var108 = ((int *) sp)[49];
            var109 = ((int *) var95)[15];
            var110 = *((int *) 0x00048F54);
            scePaf_A0E3AAE0 (var105, var110, var107, var108, var106, var109, 0x00000000, 0x00000001);
            sub_32448 (0x00048FE8, var105);
            var115 = *((int *) 0x00048FE8);
            var116 = ((int *) sp)[48];
            var117 = ((int *) var95)[15];
            var120 = scePaf_336E37F3 (var115, var116);
            if (var102 == 0x00000000)
            {
              __asm__ ("break      0x00007;");
            }
            var121 = ((int *) sp)[40];
            scePaf_6D03433C (var115, 0x00000000, var121, var117, ((((var120 + var102) + 0xFFFFFFFF) / var102) * var102));
            var5 = ((int *) sp)[61];
          }
          else
          {
            var127 = scePaf_64A8F0B9 (0x00000068);
            var128 = ((int *) var95)[14];
            var129 = ((int *) sp)[48];
            var130 = ((int *) sp)[49];
            var131 = *((int *) 0x00048F54);
            scePaf_A0E3AAE0 (var127, var131, var129, var130, var128, 0x00000002, 0x00000000, 0x00000001);
            sub_32448 (0x00048FE8, var127);
            var136 = *((int *) 0x00048FE8);
            var137 = ((int *) sp)[40];
            var138 = ((int *) var136)[3];
            var139 = ((unsigned short *) var136)[30];
            ((int *) sp)[67] = var139;
            var140 = ((unsigned short *) sp)[96];
            ((int *) sp)[66] = ((var101 << (var138 + 0xFFFFFFFD)) & 0x000000FF);
            var141 = ((unsigned short *) sp)[98];
            var144 = scePaf_B117860A (var136, 0x00000000);
            var145 = var144;
            if (!((((0x00000000 < var137)) & ((0x00000000 < var144))) == 0x00000000))
            {
              var146 = 0x00000000;
              if (!(var141 == 0x00000000))
              {
                var147 = ((int *) sp)[66];
                ((int *) sp)[68] = (var140 & (var140 + 0xFFFFFFFF));
                var148 = (var140 * var147);
                var149 = (var148 + var102) + 0xFFFFFFFF;
                ((int *) sp)[70] = ((0x00000000 < var148));
                ((int *) sp)[69] = ((var148 < 0x00000010));
                while (1) {
                  var150 = ((int *) sp)[70];
                  var151 = var146 >> 0x00000003;
                  var152 = var146 & 0x00000007;
                  var153 = 0x00000000;
                  if (!(var150 == 0x00000000))
                  {
                    var154 = ((int *) sp)[67];
                    while (1) {
                      var155 = ((unsigned char *) (var137 + var153))[0];
                      var153 = (var153 + 0x00000001) & 0x0000FFFF;
                      ((char *) (((((var152 << 0x00000001) + ((var153 & 0x0000FFF0) + (var151 * var154))) << 0x00000003) + var145) + (var153 & 0x0000000F)))[0] = var155;
                      if (((var153 < var148)) != 0x00000000)
                        continue;
                      break;
                    }
                  }
                  var156 = ((int *) sp)[68];
                  var157 = ((int *) sp)[69];
                  if (var156 != 0x00000000)
                  {

                  label86:
                    var158 = ((int *) sp)[67];
                    var159 = ((int *) sp)[66];
                    scePaf_3447707B ((((((var152 << 0x00000001) + ((var153 & 0x0000FFF0) + (var151 * var158))) << 0x00000003) + var145) + (var153 & 0x0000000F)), ((var137 + var153) - var159), var159);
                  }
                  else
                  {
                    if (!(var157 == 0x00000000))
                      goto label86;
                  }
                  var146 = (var146 + 0x00000001) & 0x0000FFFF;
                  if (var102 == 0x00000000)
                  {
                    __asm__ ("break      0x00007;");
                  }
                  var137 = var137 + (var162 * var102);
                  if (((var146 < var141)) != 0x00000000)
                    continue;
                  break;
                }
              }
              if (!((((0x00000000 < (var141 & (var141 + 0xFFFFFFFF)))) | ((var141 < 0x00000008))) == 0x00000000))
              {
                var163 = ((int *) sp)[67];
                var164 = var146 & 0x00000007;
                var165 = (0x00000000 - (var163 << 0x00000003)) + 0x00000070;
                if (!(var164 == 0x00000000))
                {
                  var165 = 0xFFFFFFF0;
                }
                var166 = ((int *) sp)[67];
                var167 = 0x00000000;
                var168 = var166 >> 0x00000004;
                var169 = var145 + (((var164 << 0x00000001) + ((var146 >> 0x00000003) * var166)) << 0x00000003);
                if (!(var168 == 0x00000000))
                {
                  while (1) {
                    scePaf_3447707B (var169, (var169 + var165), 0x00000010);
                    var167 = (var167 + 0x00000001) & 0x0000FFFF;
                    var169 = var169 + 0x00000080;
                    if (((var167 < var168)) != 0x00000000)
                      continue;
                    break;
                  }
                }
              }
            }
            var172 = *((int *) 0x00048FE8);
            scePaf_60F871BB (var172);
            var5 = ((int *) sp)[61];
          }
        }
        else
        goto label104;
      }
      else
      {
        var5 = ((int *) sp)[61];
      }
    }
    var15 = sp + 0x000000E0;
    if (var5 != 0x00000000)
    {
      var49 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var50 = sp + 0x000000E8;
      var51 = sp + 0x000000E4;
      __asm__ ("swc1       $fpr00, 224($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 228($sp);"
               "swc1       $fpr00, 232($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 236($sp);"
        : 
        : "=r"(sp));
      sub_287A8 (var15, var51, var50, 0x00000000);
      scePaf_E9DBEA88 (var15);
      var56 = *((int *) 0x00048F18);
      scePaf_E305A594 (var56, "page_default_theme_3D");
      var59 = *((int *) 0x00048F18);
      scePaf_E305A594 (var59, "page_default_theme2_3D");
      var62 = *((int *) 0x00048F18);
      scePaf_E305A594 (var62, "page_default_theme");
      var65 = *((int *) 0x00048F18);
      scePaf_27F4E35C (var65, 0x0003A4F4, 0x00000001, 0x00000000);
      var68 = *((int *) 0x00048F18);
      var71 = scePaf_11FA6015 (var68, 0x0003A4F4);
      var74 = scePaf_E05C0B73 (var71, 0x00000000);
      scePaf_CCC82881 (var74, 0x00000001);
      var77 = *((int *) 0x00048F18);
      var80 = scePaf_D27A723F (var77, "wallpaper_theme_plane");
      var81 = var80;
      if (var80 == 0x00000000)
      {

      label149:
      }
      else
      {
        var82 = *((int *) 0x00048FE8);
        if (var82 == 0x00000000)
        {
          ((char *) var81)[509] = 0x00000000;
          ((char *) var81)[510] = 0x00000000;
          scePaf_44653A84 (var81);
        }
        else
        {
          ((char *) var81)[510] = 0x00000001;
          ((char *) var81)[509] = 0x00000001;
          scePaf_44653A84 (var81);
          var85 = ((int *) var81)[0];
          var86 = ((int *) var85)[43];
          var89 var90 = (*var86) (var81, 0x00048FE8, 0x00000000);
        }
      }
    }
    else
    goto label149;
    scePaf_6BEF472A (0x00000000);
    var18 = ((int *) sp)[65];
    var19 = ((int *) sp)[64];
    if (!(var18 == 0x00000000))
    {
      if (!(var2 == 0x00000000))
      {
        scePaf_94E322DD (var2);
        scePaf_4508F2FA (var2);

      label158:
        var19 = ((int *) sp)[64];
      }
    }
  }
  else
  {
    if (!(arg3 == 0x00000000))
      goto label52;
    var175 = *((unsigned char *) 0x00048F4C);
    var176 = *((int *) 0x00048F34);
    var179 var180 = (*var176) (0x0007FC00, 0x00000000, arg3, ((var175 < 0x00000001)), arg5, arg6, arg7, arg8);
    var1 = var179;
    var181 = *((int *) 0x00048F3C);
    var182 = sp + 0x00000080;
    var185 var186 = (*var181) (var1);
    ((int *) sp)[63] = var185;
    var189 = scePaf_7A618FD3 (0x00000000, 0x0007FC00, var185);
    ((int *) sp)[64] = var189;
    var190 = 0x00000000;
    ((int *) sp)[60] = 0x00000000;
    sceVshCommonUtil_D87E8E2D (var182, "/CONFIG/SYSTEM/XMB/THEME");
    var193 = sp + 0x000000F0;
    var196 = sceVshCommonUtil_7A73DC84 (var182, "wallpaper_mode", var193);
    var197 = ((int *) sp)[60];
    if (((var197 < 0x00000005)) == 0x00000000)
    {
    case 0:
    case 1:
    case 4:

    label42:
      var199 = ((int *) sp)[64];
      var202 = scePaf_269AC167 ("flash1:/vsh/theme/wallpaper.bmp", var199, 0x00000000, 0x00000000, 0x00000000);
      var2 = var202;

    label45:
      sceVshCommonUtil_625A9A5D (var182);
      if (var2 == 0x00000000)
      {
        ((int *) sp)[62] = 0x80108101;
        goto label158;
      }
      else
      {
        var207 var208 = scePaf_0A6D0925 (var2, 0x00000001);
        ((int *) sp)[40] = var207;
        ((int *) sp)[65] = 0x00000001;
        ((int *) sp)[41] = var208;
        goto label52;
      }
    }
    else
    {
      var198 = ((int *) ((var197 << 0x00000002) + 0x000453C4))[0];
      switch () {
      goto label42;
      goto label42;
      case 2:

      label19:
        var209 = sp;
        scePaf_15AFC8D3 (var209, 0x00000080, 0x0003A590, "flash0:/vsh/resource/custom_theme.dat");
        var212 = sp;
        var215 = vsh_4B420C67 (var212, 0x00000000);
        if (var215 == 0x00000000)
        {
          var226 = vsh_FACD4E39 (0x00000001);
          var227 = ((int *) sp)[63];
          if (var226 == 0x00000000)
          {
            var232 = vsh_0732F306 (0x00000001, 0x00000000, var227, 0x00000001);
            var190 = !(var232) ? 0x00000001 : 0x00000000;
          }
          vsh_288E498D (0x00000001);
        }
        vsh_6E3282C1 ();
        if (var190 == 0x00000000)
        {
          sceVshCommonUtil_625A9A5D (var182);
          var19 = ((int *) sp)[64];
        }
        else
        {
          var218 = ((int *) sp)[63];
          var221 = scePaf_46B03301 (var218, 0x0007FC00, 0x00000000, 0x00000005);
          var2 = var221;
          goto label45;
        }
      case 3:
        goto label19;
      goto label42;
      }
    }
  }
  var24 = ((int *) sp)[63];
  if (!(var19 == 0x00000000))
  {
    scePaf_84A46DD7 ();
    var24 = ((int *) sp)[63];
  }
  if (!(var24 == 0x00000000))
  {
    scePaf_6439FDBC (var24, 0x00000000, 0x0007FC00);
    var29 = *((int *) 0x00048F40);
    var32 var33 = (*var29) (var1);
  }
  if (!(var1 == 0x00000000))
  {
    var34 = *((int *) 0x00048F38);
    var37 var38 = (*var34) (var1);
  }
  var39 = ((int *) sp)[62];
  ra = ((int *) sp)[81];
  var40 = ((int *) sp)[80];
  var41 = ((int *) sp)[79];
  var42 = ((int *) sp)[78];
  var43 = ((int *) sp)[77];
  var44 = ((int *) sp)[76];
  var45 = ((int *) sp)[75];
  var46 = ((int *) sp)[74];
  var47 = ((int *) sp)[73];
  var48 = ((int *) sp)[72];
  sp = sp + 0x00000150;
  return var39;
}

/**
 * Subroutine at address 0x000283FC
 */
void sub_283FC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s6;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  var1 = sp;
  ((int *) sp)[18] = s2;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[17] = s1;
  var3 = arg2 & 0x000000FF;
  var4 = 0x00000000;
  ((int *) sp)[23] = ra;
  ((int *) sp)[21] = s5;
  ((int *) sp)[16] = s0;
  ((int *) sp)[12] = 0x00000000;
  var5 = *((int *) 0x00048F30);
  sceVshCommonUtil_D87E8E2D (var1, "/CONFIG/SYSTEM/XMB/THEME");
  var8 = sp;
  var9 = sp + 0x00000030;
  var12 = sceVshCommonUtil_7A73DC84 (var8, "wallpaper_mode", var9);
  var13 = ((int *) sp)[12];
  if (!(var12 != 0x00000000))
  {
    if (var13 == 0x00000000)
    {
      *((int *) 0x00048F30) = 0x00000000;

    label14:
    }
    else
    {
      if (var13 == 0x00000004)
      {
        *((int *) 0x00048F30) = 0x00000001;
        goto label14;
      }
      else
      {
        if (!(var2 != 0x00000000))
        {
          *((int *) 0x00048F30) = 0x00000000;
          goto label14;
        }
      }
    }
    var14 = *((int *) 0x00048F30);
    var4 = ((var5 ^ var14)) ? 0x00000001 : 0x00000000;
  }
  var15 = sp;
  sceVshCommonUtil_625A9A5D (var15);
  if (var2 == 0x00000000)
  {
    *((char *) 0x00048FEC) = 0x00000000;
    if (var3 != 0x00000000)
    {
      scePaf_BD500444 (0x00000000);
      sub_2728C ();
      sub_27A40 ();
      sub_27C60 ();
      *((char *) 0x00048F2D) = 0x00000000;
      scePaf_6BEF472A (0x00000000);
    }
    else
    {
      *((char *) 0x00048F2D) = 0x00000001;
    }
    *((char *) 0x00048F2C) = 0x00000000;
    sub_27620 (var3, var4);
  }
  else
  {
    var18 = *((unsigned char *) 0x00048FEC);
    if (((var18) ? 0x00000001 : var3) == 0x00000000)
    {
      var34 = sub_27C9C (0x00000000, 0x00000001, 0x00000000);
      var22 = var34;
      if (!(var34 != 0x00000000))
      {

      label46:
        *((char *) 0x00048F2C) = 0x00000001;
        *((char *) 0x00048F2D) = 0x00000000;
      }
    }
    else
    {
      var21 = sub_27C9C (0x00000001, 0x00000001, 0x00000000);
      var22 = var21;
      if (var21 == 0x00000000)
      {
        sub_2728C ();
        goto label46;
      }
    }
  }
  ra = ((int *) sp)[23];
  var23 = ((int *) sp)[22];
  var24 = ((int *) sp)[21];
  var25 = ((int *) sp)[20];
  var26 = ((int *) sp)[19];
  var27 = ((int *) sp)[18];
  var28 = ((int *) sp)[17];
  var29 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x000285B8
 */
void sub_285B8 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var1 = arg1;
  ((int *) sp)[12] = s0;
  var4 var5 = scePaf_0A6D0925 (arg1, 0x00000001);
  ((int *) sp)[1] = var5;
  var6 = sp + 0x00000010;
  ((int *) sp)[0] = var4;
  sub_2D178 ("flash1:/vsh/theme/wallpaper.bmp", var1);
  sceVshCommonUtil_D87E8E2D (var6, "/CONFIG/SYSTEM/XMB/THEME");
  var13 = sceVshCommonUtil_2D4BC09F (var6, "wallpaper_mode", 0x00000001);
  if (var13 != 0x00000000)
  {
    vsh_E5463CE5 (0x00000001);
  }
  sceVshCommonUtil_625A9A5D (var6);
  *((int *) 0x00048F30) = 0xFFFFFFFF;
  *((char *) 0x00048F2C) = 0x00000001;
  *((char *) 0x00048F2D) = 0x00000000;
  var18 = sub_27C9C (0x00000001, 0x00000001, var1);
  ra = ((int *) sp)[14];
  var19 = ((int *) sp)[13];
  var20 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00028678
 */
void sub_28678 ()
{
  var1 = *((int *) 0x00048F24);
  return;
}

/**
 * Subroutine at address 0x00028684
 */
void sub_28684 ()
{
  var1 = *((unsigned char *) 0x00048F2C);
  return;
}

/**
 * Subroutine at address 0x00028690
 */
void sub_28690 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_269AC167 ("flash1:/vsh/theme/wallpaper.bmp", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
  var4 = var3;
  if (!(var4 == 0x00000000))
  {
    scePaf_94E322DD (var3);
    scePaf_4508F2FA (var4);
  }
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000286EC
 */
void sub_286EC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFE70;
  ((int *) sp)[99] = ra;
  var1 = 0x0003A600;
  ((int *) sp)[98] = s2;
  var2 = arg3;
  var3 = sp;
  ((int *) sp)[97] = s1;
  var4 = arg2;
  ((int *) sp)[96] = s0;
  var5 = arg1;
  while (1) {
    var6 = ((int *) var1)[0];
    var7 = ((int *) var1)[1];
    var8 = ((int *) var1)[2];
    var9 = ((int *) var1)[3];
    ((int *) var3)[0] = var6;
    var1 = var1 + 0x00000010;
    var3 = var3 + 0x00000010;
    ((int *) var3)[1073741821] = var7;
    ((int *) var3)[1073741822] = var8;
    ((int *) var3)[1073741823] = var9;
    if (var1 != 0x0003A770)
      continue;
    break;
  }
  var10 = ((int *) var1)[0];
  ((int *) var3)[0] = var10;
  if (arg4 == 0x00000000)
  {
    var18 = sub_28864 ();
    var11 = var18;
  }
  else
  {
    var11 = arg4 + 0xFFFFFFFF;
  }
  var12 = (((var11 << 0x00000001) + var11) << 0x00000002) + sp;
  __asm__ ("lwc1       $fpr02, 8($v0);"
           "lwc1       $fpr00, 0($v0);"
           "lwc1       $fpr01, 4($v0);");
  ra = ((int *) sp)[99];
  __asm__ ("swc1       $fpr00, 0($s0);"
           "swc1       $fpr01, 0($s1);"
    : 
    : "=r"(var5), "=r"(var4));
  var13 = ((int *) sp)[96];
  __asm__ ("swc1       $fpr02, 0($s2);"
    : 
    : "=r"(var2));
  var14 = ((int *) sp)[97];
  var15 = ((int *) sp)[98];
  sp = sp + 0x00000190;
  return;
}

/**
 * Subroutine at address 0x000287A8
 */
void sub_287A8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFE70;
  ((int *) sp)[99] = ra;
  var1 = 0x0003A774;
  ((int *) sp)[98] = s2;
  var2 = arg3;
  var3 = sp;
  ((int *) sp)[97] = s1;
  var4 = arg2;
  ((int *) sp)[96] = s0;
  var5 = arg1;
  while (1) {
    var6 = ((int *) var1)[0];
    var7 = ((int *) var1)[1];
    var8 = ((int *) var1)[2];
    var9 = ((int *) var1)[3];
    ((int *) var3)[0] = var6;
    var1 = var1 + 0x00000010;
    var3 = var3 + 0x00000010;
    ((int *) var3)[1073741821] = var7;
    ((int *) var3)[1073741822] = var8;
    ((int *) var3)[1073741823] = var9;
    if (var1 != 0x0003A8E4)
      continue;
    break;
  }
  var10 = ((int *) var1)[0];
  ((int *) var3)[0] = var10;
  if (arg4 == 0x00000000)
  {
    var18 = sub_28864 ();
    var11 = var18;
  }
  else
  {
    var11 = arg4 + 0xFFFFFFFF;
  }
  var12 = (((var11 << 0x00000001) + var11) << 0x00000002) + sp;
  __asm__ ("lwc1       $fpr02, 8($v0);"
           "lwc1       $fpr00, 0($v0);"
           "lwc1       $fpr01, 4($v0);");
  ra = ((int *) sp)[99];
  __asm__ ("swc1       $fpr00, 0($s0);"
           "swc1       $fpr01, 0($s1);"
    : 
    : "=r"(var5), "=r"(var4));
  var13 = ((int *) sp)[96];
  __asm__ ("swc1       $fpr02, 0($s2);"
    : 
    : "=r"(var2));
  var14 = ((int *) sp)[97];
  var15 = ((int *) sp)[98];
  sp = sp + 0x00000190;
  return;
}

/**
 * Subroutine at address 0x00028864
 */
int sub_28864 ()
{
  var1 = *((int *) 0x00048F20);
  var2 = 0x0000001E;
  if (var1 != 0x00000000)
  {

  label5:
  }
  else
  {
    var3 = *((int *) 0x00048F24);
    if (var3 != 0x00000000)
    {
      var2 = *((int *) 0x00048F28);
      goto label5;
    }
    else
    {
      var4 = *((int *) 0x00048F58);
      var2 = var4 + 0xFFFFFFFF;
    }
  }
  return var2;
}

/**
 * Subroutine at address 0x000288A0
 */
void sub_288A0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_32408 (arg1, 0x00048FE4);
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000288D0
 */
void sub_288D0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_32408 (arg1, 0x00048FE8);
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00028900
 */
void sub_28900 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  if (arg1 == 0x00000000)
  {

  label112:
    ra = ((int *) sp)[6];
  }
  else
  {
    var2 = *((int *) 0x00047168);
    var3 = sp;
    scePaf_047C9996 (var3, var2, "tex_default_text_focus");
    var6 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000068), var6);
    var9 = ((int *) sp)[0];
    var10 = *((int *) 0x00047168);
    if (!(var9 == 0x00000000))
    {
      var11 = ((int *) var9)[1];
      var12 = var11 + 0xFFFFFFFF;
      ((int *) var9)[1] = var12;
      if (var12 <= 0)
      {
        var193 = ((int *) var9)[0];
        var194 = ((int *) var193)[1];
        var197 var198 = (*var194) (var9, var10);
        var199 = *((int *) 0x00047168);
      }
      else
      {
        var13 = *((int *) 0x00047168);
      }
    }
    var14 = sp;
    scePaf_047C9996 (var14, var13, "tex_default_progress_base");
    var17 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x0000006C), var17);
    var20 = ((int *) sp)[0];
    var21 = *((int *) 0x00047168);
    if (!(var20 == 0x00000000))
    {
      var22 = ((int *) var20)[1];
      var23 = var22 + 0xFFFFFFFF;
      ((int *) var20)[1] = var23;
      if (var23 <= 0)
      {
        var186 = ((int *) var20)[0];
        var187 = ((int *) var186)[1];
        var190 var191 = (*var187) (var20, var21);
        var192 = *((int *) 0x00047168);
      }
      else
      {
        var24 = *((int *) 0x00047168);
      }
    }
    var25 = sp;
    scePaf_047C9996 (var25, var24, "tex_default_progress_base_shadow");
    var28 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000070), var28);
    var31 = ((int *) sp)[0];
    var32 = *((int *) 0x00047168);
    if (!(var31 == 0x00000000))
    {
      var33 = ((int *) var31)[1];
      var34 = var33 + 0xFFFFFFFF;
      ((int *) var31)[1] = var34;
      if (var34 <= 0)
      {
        var179 = ((int *) var31)[0];
        var180 = ((int *) var179)[1];
        var183 var184 = (*var180) (var31, var32);
        var185 = *((int *) 0x00047168);
      }
      else
      {
        var35 = *((int *) 0x00047168);
      }
    }
    var36 = sp;
    scePaf_047C9996 (var36, var35, "tex_default_progress_slider");
    var39 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000074), var39);
    var42 = ((int *) sp)[0];
    var43 = *((int *) 0x00047168);
    if (!(var42 == 0x00000000))
    {
      var44 = ((int *) var42)[1];
      var45 = var44 + 0xFFFFFFFF;
      ((int *) var42)[1] = var45;
      if (var45 <= 0)
      {
        var172 = ((int *) var42)[0];
        var173 = ((int *) var172)[1];
        var176 var177 = (*var173) (var42, var43);
        var178 = *((int *) 0x00047168);
      }
      else
      {
        var46 = *((int *) 0x00047168);
      }
    }
    var47 = sp;
    scePaf_047C9996 (var47, var46, "tex_default_scroll_base");
    var50 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000078), var50);
    var53 = ((int *) sp)[0];
    var54 = *((int *) 0x00047168);
    if (!(var53 == 0x00000000))
    {
      var55 = ((int *) var53)[1];
      var56 = var55 + 0xFFFFFFFF;
      ((int *) var53)[1] = var56;
      if (var56 <= 0)
      {
        var165 = ((int *) var53)[0];
        var166 = ((int *) var165)[1];
        var169 var170 = (*var166) (var53, var54);
        var171 = *((int *) 0x00047168);
      }
      else
      {
        var57 = *((int *) 0x00047168);
      }
    }
    var58 = sp;
    scePaf_047C9996 (var58, var57, "tex_default_scroll_base_shadow");
    var61 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x0000007C), var61);
    var64 = ((int *) sp)[0];
    var65 = *((int *) 0x00047168);
    if (!(var64 == 0x00000000))
    {
      var66 = ((int *) var64)[1];
      var67 = var66 + 0xFFFFFFFF;
      ((int *) var64)[1] = var67;
      if (var67 <= 0)
      {
        var158 = ((int *) var64)[0];
        var159 = ((int *) var158)[1];
        var162 var163 = (*var159) (var64, var65);
        var164 = *((int *) 0x00047168);
      }
      else
      {
        var68 = *((int *) 0x00047168);
      }
    }
    var69 = sp;
    scePaf_047C9996 (var69, var68, "tex_default_scroll_slider");
    var72 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000080), var72);
    var75 = ((int *) sp)[0];
    var76 = *((int *) 0x00047168);
    if (!(var75 == 0x00000000))
    {
      var77 = ((int *) var75)[1];
      var78 = var77 + 0xFFFFFFFF;
      ((int *) var75)[1] = var78;
      if (var78 <= 0)
      {
        var151 = ((int *) var75)[0];
        var152 = ((int *) var151)[1];
        var155 var156 = (*var152) (var75, var76);
        var157 = *((int *) 0x00047168);
      }
      else
      {
        var79 = *((int *) 0x00047168);
      }
    }
    var80 = sp;
    scePaf_047C9996 (var80, var79, "tex_default_scroll_arrow_up");
    var83 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000084), var83);
    var86 = ((int *) sp)[0];
    var87 = *((int *) 0x00047168);
    if (!(var86 == 0x00000000))
    {
      var88 = ((int *) var86)[1];
      var89 = var88 + 0xFFFFFFFF;
      ((int *) var86)[1] = var89;
      if (var89 <= 0)
      {
        var144 = ((int *) var86)[0];
        var145 = ((int *) var144)[1];
        var148 var149 = (*var145) (var86, var87);
        var150 = *((int *) 0x00047168);
      }
      else
      {
        var90 = *((int *) 0x00047168);
      }
    }
    var91 = sp;
    scePaf_047C9996 (var91, var90, "tex_default_scroll_arrow_up_shadow");
    var94 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000088), var94);
    var97 = ((int *) sp)[0];
    var98 = *((int *) 0x00047168);
    if (!(var97 == 0x00000000))
    {
      var99 = ((int *) var97)[1];
      var100 = var99 + 0xFFFFFFFF;
      ((int *) var97)[1] = var100;
      if (var100 <= 0)
      {
        var137 = ((int *) var97)[0];
        var138 = ((int *) var137)[1];
        var141 var142 = (*var138) (var97, var98);
        var143 = *((int *) 0x00047168);
      }
      else
      {
        var101 = *((int *) 0x00047168);
      }
    }
    var102 = sp;
    scePaf_047C9996 (var102, var101, "tex_default_spin_arrow_up");
    var105 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000090), var105);
    var108 = ((int *) sp)[0];
    var109 = *((int *) 0x00047168);
    if (!(var108 == 0x00000000))
    {
      var110 = ((int *) var108)[1];
      var111 = var110 + 0xFFFFFFFF;
      ((int *) var108)[1] = var111;
      if (var111 <= 0)
      {
        var130 = ((int *) var108)[0];
        var131 = ((int *) var130)[1];
        var134 var135 = (*var131) (var108, var109);
        var136 = *((int *) 0x00047168);
      }
      else
      {
        var112 = *((int *) 0x00047168);
      }
    }
    var113 = sp;
    scePaf_047C9996 (var113, var112, "tex_default_spin_arrow_up_shadow");
    var116 = ((int *) sp)[0];
    sub_32448 ((var1 + 0x00000094), var116);
    var119 = ((int *) sp)[0];
    ra = ((int *) sp)[6];
    if (!(var119 == 0x00000000))
    {
      var120 = ((int *) var119)[1];
      var121 = var120 + 0xFFFFFFFF;
      ((int *) var119)[1] = var121;
      if (!(var121 <= 0))
        goto label112;
      var124 = ((int *) var119)[0];
      var125 = ((int *) var124)[1];
      var128 var129 = (*var125) (var119);
      ra = ((int *) sp)[6];
    }
  }
  var122 = ((int *) sp)[5];
  var123 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00028CCC
 */
void sub_28CCC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (!(arg1 == 0x00000000))
  {
    var2 = *((int *) 0x00047168);
    var5 = scePaf_58EE9589 (var2, 0x0003AA30);
    ((int *) var1)[38] = var5;
    var6 = *((int *) 0x00047168);
    var9 = scePaf_58EE9589 (var6, 0x0003AA3C);
    ((int *) var1)[39] = var9;
    var10 = *((int *) 0x00047168);
    var13 = scePaf_58EE9589 (var10, 0x0003AA48);
    ((int *) var1)[40] = var13;
    var14 = *((int *) 0x00047168);
    var17 = scePaf_58EE9589 (var14, 0x0003AA48);
    ((int *) var1)[41] = var17;
    var18 = *((int *) 0x00047168);
    var21 = scePaf_58EE9589 (var18, "snd_category_decide");
    ((int *) var1)[42] = var21;
    var22 = *((int *) 0x00047168);
    var25 = scePaf_58EE9589 (var22, 0x0003AA48);
    ((int *) var1)[43] = var25;
    var26 = *((int *) 0x00047168);
    var29 = scePaf_58EE9589 (var26, 0x0003AA30);
    ((int *) var1)[44] = var29;
    var30 = *((int *) 0x00047168);
    var33 = scePaf_58EE9589 (var30, 0x0003AA48);
    ((int *) var1)[45] = var33;
    var34 = *((int *) 0x00047168);
    var37 = scePaf_58EE9589 (var34, 0x0003AA3C);
    ((int *) var1)[46] = var37;
    var38 = *((int *) 0x00047168);
    var41 = scePaf_58EE9589 (var38, 0x0003AA3C);
    ((int *) var1)[47] = var41;
    var42 = *((int *) 0x00047168);
    var45 = scePaf_58EE9589 (var42, 0x0003AA3C);
    ((int *) var1)[48] = var45;
    var46 = *((int *) 0x00047168);
    var49 = scePaf_58EE9589 (var46, 0x0003AA30);
    ((int *) var1)[49] = var49;
    var50 = *((int *) 0x00047168);
    var53 = scePaf_58EE9589 (var50, 0x0003AA48);
    ((int *) var1)[50] = var53;
    var54 = *((int *) 0x00047168);
    var57 = scePaf_58EE9589 (var54, 0x0003AA30);
    ((int *) var1)[51] = var57;
    var58 = *((int *) 0x00047168);
    var61 = scePaf_58EE9589 (var58, 0x0003AA3C);
    ((int *) var1)[52] = var61;
    var62 = *((int *) 0x00047168);
    var65 = scePaf_58EE9589 (var62, 0x0003AA48);
    ((int *) var1)[53] = var65;
    var66 = *((int *) 0x00047168);
    var69 = scePaf_58EE9589 (var66, 0x0003AA30);
    ((int *) var1)[54] = var69;
    var70 = *((int *) 0x00047168);
    var73 = scePaf_58EE9589 (var70, 0x0003AA3C);
    ((int *) var1)[55] = var73;
    var74 = *((int *) 0x00047168);
    var77 = scePaf_58EE9589 (var74, 0x0003AA48);
    ((int *) var1)[56] = var77;
    var78 = *((int *) 0x00047168);
    var81 = scePaf_58EE9589 (var78, 0x0003AA30);
    ((int *) var1)[57] = var81;
    var82 = *((int *) 0x00047168);
    var85 = scePaf_58EE9589 (var82, 0x0003AA3C);
    ((int *) var1)[58] = var85;
    var86 = *((int *) 0x00047168);
    var89 = scePaf_58EE9589 (var86, 0x0003AA48);
    ((int *) var1)[59] = var89;
  }
  ra = ((int *) sp)[5];
  var90 = ((int *) sp)[4];
  var91 = ((int *) sp)[3];
  var92 = ((int *) sp)[2];
  var93 = ((int *) sp)[1];
  var94 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00028E90
 */
void sub_28E90 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[3] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x00048F18);
  var3 = *((unsigned char *) 0x00048F91);
  *((char *) 0x00048F91) = var1;
  if (var2 != 0x00000000)
  {
    var9 = scePaf_11FA6015 (var2, "page_default_theme_3D", var2);
    if (var9 == 0x00000000)
    {
      var14 = *((int *) 0x00048F18);
      var9 = scePaf_11FA6015 (var14, "page_default_theme2_3D");
      if (var9 != 0x00000000)
      {

      label12:
        __asm__ ("mov.s      $fpr12, $fpr20;");
        if (var1 == 0x00000000)
        {
          __asm__ ("mov.s      $fpr12, $fpr20;");
          scePaf_4FEF4DB9 (var9, 0x00000001, 0x00000000);
        }
        else
        {
          scePaf_531031AD (var9, 0x00000001, 0x00000000);
        }
      }
      else
      {
      }
    }
    else
    {
      goto label12;
    }
  }
  else
  {
  }
  ra = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00028F64
 */
void sub_28F64 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[3] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x00048F18);
  var3 = *((unsigned char *) 0x00048F92);
  *((char *) 0x00048F92) = var1;
  if (var2 != 0x00000000)
  {
    var9 = scePaf_11FA6015 (var2, "page_default_theme", var2);
    if (var9 == 0x00000000)
    {
      var14 = *((int *) 0x00048F18);
      var9 = scePaf_11FA6015 (var14, "wallpaper_theme_plane");
      if (var9 != 0x00000000)
      {

      label12:
        __asm__ ("mov.s      $fpr12, $fpr20;");
        if (var1 == 0x00000000)
        {
          __asm__ ("mov.s      $fpr12, $fpr20;");
          scePaf_4FEF4DB9 (var9, 0x00000001, 0x00000000);
        }
        else
        {
          scePaf_531031AD (var9, 0x00000001, 0x00000000);
        }
      }
      else
      {
      }
    }
    else
    {
      goto label12;
    }
  }
  else
  {
  }
  ra = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029038
 */
void sub_29038 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  sub_28E90 (var1);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_28F64 (var1);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029078
 */
void sub_29078 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00048F18);
  if (var1 != 0x00000000)
  {
    var5 = scePaf_D27A723F (var1, "wallpaper_theme_cover");
    __asm__ ("mov.s      $fpr12, $fpr20;");
    if (var5 == 0x00000000)
    {

    label13:
      ra = ((int *) sp)[1];
    }
    else
    {
      var6 = var5;
      if ((arg1 & 0x000000FF) == 0x00000000)
      {
        scePaf_4FEF4DB9 (var6, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
      else
      {
        scePaf_531031AD (var6, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
    }
  }
  else
  goto label13;
  var2 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029100
 */
void sub_29100 ()
{
  sp = sp + 0xFFFFFFD0;
  __asm__ ("swc1       $fpr21, 36($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[4] = ra;
  __asm__ ("mov.s      $fpr21, $fpr13;");
  var1 = *((int *) 0x00048F18);
  if (var1 != 0x00000000)
  {
    var4 = scePaf_11FA6015 (var1, "wallpaper_theme_plane", arg3);
    var5 = sp;
    __asm__ ("mtc1       $zr, $fpr13;");
    __asm__ ("mov.s      $fpr12, $fpr21;");
    if (var4 == 0x00000000)
    {

    label9:
      ra = ((int *) sp)[4];
    }
    else
    {
      var6 = ((int *) var4)[0];
      var7 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr20, 8($sp);"
               "swc1       $fpr00, 12($sp);"
               "swc1       $fpr20, 0($sp);"
               "swc1       $fpr20, 4($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var8 = ((int *) var6)[50];
      var11 var12 = (*var8) (var4, 0x01000002, 0x00000000, var5);
      ra = ((int *) sp)[4];
    }
  }
  else
  goto label9;
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002919C
 */
void sub_2919C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  var1 = *((int *) 0x00048F18);
  if (var1 != 0x00000000)
  {
    var5 = scePaf_D27A723F (var1, "default_theme_model");
    __asm__ ("mov.s      $fpr12, $fpr20;");
    if (var5 == 0x00000000)
    {

    label9:
      ra = ((int *) sp)[1];
    }
    else
    {
      scePaf_54BB1681 (var5, arg1);
      ra = ((int *) sp)[1];
    }
  }
  else
  goto label9;
  var2 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029208
 */
void sub_29208 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = 0xFFFFFFFF;
  var2 = *((int *) 0x00048F18);
  if (!(var2 == 0x00000000))
  {
    var5 = scePaf_11FA6015 (var2, "page_default_theme2_3D", arg3);
    var1 = 0xFFFFFFFF;
    if (!(var5 == 0x00000000))
    {
      var8 = scePaf_5B988637 (var5, "swave_theme", 0x00000000);
      var1 = 0xFFFFFFFF;
      if (!(var8 == 0x00000000))
      {
        var9 = ((int *) var8)[0];
        var10 = ((int *) var9)[30];
        var13 var14 = (*var10) (var8, arg1, arg2, 0xFFFFFFFF);
        var1 = var13;
      }
    }
  }
  ra = ((int *) sp)[2];
  var15 = ((int *) sp)[1];
  var16 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000292A4
 */
void sub_292A4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0xFFFFFFFF;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr21, 20($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 16($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[3] = ra;
  var2 = *((int *) 0x00048F18);
  if (!(var2 == 0x00000000))
  {
    var5 = scePaf_11FA6015 (var2, "page_default_theme2_3D", arg3);
    var1 = 0xFFFFFFFF;
    if (!(var5 == 0x00000000))
    {
      var8 = scePaf_5B988637 (var5, "swave_theme", 0x00000000);
      __asm__ ("mov.s      $fpr12, $fpr20;"
               "mov.s      $fpr13, $fpr21;");
      var1 = 0xFFFFFFFF;
      if (!(var8 == 0x00000000))
      {
        var9 = ((int *) var8)[0];
        var10 = ((int *) var9)[50];
        var13 var14 = (*var10) (var8, arg1, arg2, arg3, 0xFFFFFFFF);
        var1 = var13;
      }
    }
  }
  ra = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr21, 20($sp);"
           "lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029370
 */
void sub_29370 ()
{
  var1 = *((int *) 0x00048F30);
  return;
}

/**
 * Subroutine at address 0x0002937C
 */
void sub_2937C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  var2 = *((int *) 0x00048F1C);
  *((char *) 0x00048F93) = var1;
  if (var2 != 0x00000000)
  {
    var6 = scePaf_11FA6015 (var2, "page_indicator", var2);
    var7 = var6;
    if (var6 == 0x00000000)
    {

    label15:
      ra = ((int *) sp)[1];
    }
    else
    {
      if (var1 == 0x00000000)
      {
        var12 = *((int *) 0x00048F5C);
        __asm__ ("mov.s      $fpr12, $fpr20;");
        var13 = var12 + 0xFFFFFFFF;
        *((int *) 0x00048F5C) = var13;
        if (var13 != 0x00000000)
          goto label15;
        scePaf_4FEF4DB9 (var7, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
      else
      {
        var8 = *((int *) 0x00048F5C);
        __asm__ ("mov.s      $fpr12, $fpr20;");
        var9 = var8 + 0x00000001;
        *((int *) 0x00048F5C) = var9;
        if (var9 != 0x00000001)
          goto label15;
        scePaf_531031AD (var7, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
    }
  }
  else
  goto label15;
  var3 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029444
 */
void sub_29444 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = ra;
  var1 = 0x7FFFFFFF;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x7FFFFFFF));
  var2 = sp;
  ((int *) sp)[8] = s0;
  var3 = ((int *) arg1)[0];
  __asm__ ("swc1       $fpr00, 0($sp);"
           "swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var4 = ((int *) var3)[38];
  __asm__ ("swc1       $fpr00, 8($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var7 var8 = (*var4) (arg1, 0x00000012, var2, arg4, arg5, arg6, arg7, arg8);
  var9 = *((int *) 0x00048F1C);
  var12 = scePaf_D27A723F (var9, "infotext1");
  var13 = var12;
  var14 = sp + 0x00000010;
  __asm__ ("mtc1       $zr, $fpr4;");
  if (!(var12 == 0x00000000))
  {
    __asm__ ("lwc1       $fpr02, 0($sp);");
    var15 = 0x43EB0000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x43EB0000));
    var16 = 0x41F00000;
    __asm__ ("mtc1       $at, $fpr1;"
             "sub.s      $fpr00, $fpr00, $fpr02;"
             "sub.s      $fpr00, $fpr00, $fpr01;"
             "c.lt.s     $fpr00, $fpr04;"
      : 
      : "=r"(0x41F00000));
    __asm__ ("bc1f       0x000294D8;"
             "lwc1       $fpr03, 4($sp);");
    {
      __asm__ ("mov.s      $fpr00, $fpr04;");
    }
    var17 = ((int *) var13)[0];
    __asm__ ("swc1       $fpr00, 16($sp);"
      : 
      : "=r"(sp));
    var18 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var19 = ((int *) var17)[23];
    __asm__ ("swc1       $fpr00, 24($sp);"
             "swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr03, 20($sp);"
      : 
      : "=r"(sp));
    var22 var23 = (*var19) (var12, var14);
    var26 = scePaf_ED055C3C (var13, 0x01000004);
    ((char *) var13)[510] = 0x00000001;
    ((char *) var13)[509] = 0x00000001;
    scePaf_44653A84 (var13);
  }
  ra = ((int *) sp)[9];
  var29 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00029530
 */
void sub_29530 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s6;
  ((int *) sp)[18] = s2;
  var1 = *((int *) 0x00048F1C);
  ((int *) sp)[19] = s3;
  ((int *) sp)[20] = s4;
  ((int *) sp)[23] = ra;
  ((int *) sp)[21] = s5;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  scePaf_27F4E35C (var1, "page_infobar", 0x00000000, 0x00000000);
  var4 = *((int *) 0x00048F1C);
  var7 = scePaf_D27A723F (var4, "infoicon");
  var8 = *((int *) 0x00048F1C);
  var9 = var7;
  var12 = scePaf_D27A723F (var8, "infotext1");
  var13 = *((int *) 0x00048F1C);
  var14 = var12;
  var17 = scePaf_D27A723F (var13, "infotext2");
  var18 = var17;
  scePaf_CA38E212 (var17, 0x0002000C, 0x00029444, 0x00000000);
  var21 = ((int *) var9)[0];
  var22 = ((int *) var21)[43];
  var25 var26 = (*var22) (var9, arg1, 0x00000000);
  var27 = sp;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_33618 (var27, arg2);
  var30 = ((int *) var14)[0];
  var31 = sp;
  var32 = ((int *) var30)[45];
  var35 var36 = (*var32) (var14, var31, 0x00000000);
  var37 = sp;
  sub_335E8 (var37);
  var40 = sp;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_33618 (var40, arg3);
  var43 = sp;
  var44 = ((int *) var18)[0];
  var45 = ((int *) var44)[45];
  var48 var49 = (*var45) (var18, var43, 0x00000000);
  var50 = sp;
  sub_335E8 (var50);
  var53 = ((int *) var18)[4];
  if (((var53 >> 12) & 0x00000001) != 0x00000000)
  {
    ((char *) var14)[509] = 0x00000000;
    ((char *) var14)[510] = 0x00000000;
    scePaf_44653A84 (var14);
  }
  else
  {
  }
  var54 = *((unsigned char *) 0x00048F60);
  if (var54 == 0x00000000)
  {
    var62 = *((int *) 0x00048F1C);
    var65 = scePaf_D27A723F (var62, "infobar");
    var66 = sp + 0x00000038;
    var67 = sp + 0x00000030;
    var68 = sp + 0x00000034;
    var69 = var65;
    sub_286EC (var67, var68, var66, 0x00000000);
    __asm__ ("lwc1       $fpr00, 48($sp);");
    var72 = ((int *) var69)[0];
    var73 = sp + 0x00000020;
    __asm__ ("swc1       $fpr00, 32($sp);"
      : 
      : "=r"(sp));
    __asm__ ("lwc1       $fpr00, 52($sp);");
    var74 = ((int *) var72)[21];
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    var75 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 44($sp);"
             "lwc1       $fpr00, 56($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    __asm__ ("swc1       $fpr00, 40($sp);"
      : 
      : "=r"(sp));
    var78 var79 = (*var74) (var69, var73);
    var82 = scePaf_ED055C3C (var69, 0x01000002);
    var83 = *((int *) 0x00048F1C);
    scePaf_5BC7BB59 (var83, var69, "anim_infobar_show");
    var86 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    sub_2937C (0x00000000);
    *((char *) 0x00048F60) = 0x00000001;
  }
  ra = ((int *) sp)[23];
  var55 = ((int *) sp)[22];
  var56 = ((int *) sp)[21];
  var57 = ((int *) sp)[20];
  var58 = ((int *) sp)[19];
  var59 = ((int *) sp)[18];
  var60 = ((int *) sp)[17];
  var61 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00029754
 */
void sub_29754 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x00048F1C);
  var4 = scePaf_11FA6015 (var1, "page_infobar", arg3);
  if (var4 != 0x00000000)
  {
    var7 = *((int *) 0x00048F1C);
    var10 = scePaf_D27A723F (var7, "infobar");
    if ((arg1 & 0x000000FF) == 0x00000000)
    {
      var18 = *((int *) 0x00048F1C);
    }
    else
    {
      var11 = *((int *) 0x00048F1C);
    }
    scePaf_5BC7BB59 (var11, var10, "anim_infobar_hide_immediately");
    var14 = *((unsigned char *) 0x00048F60);
    var15 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (!(var14 == 0x00000000))
    {
      sub_2937C (0x00000001);
      *((char *) 0x00048F60) = 0x00000000;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000297FC
 */
void sub_297FC ()
{
  var1 = *((unsigned char *) 0x00048F60);
  return;
}

/**
 * Subroutine at address 0x00029808
 */
void sub_29808 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  sub_32328 (arg1, 0x00000000);
  var4 = *((int *) 0x00048F1C);
  var7 = scePaf_D27A723F (var4, "infoicon");
  if (!(var7 == 0x00000000))
  {
    var8 = ((int *) var7)[0];
    var9 = ((int *) var8)[44];
    var12 var13 = (*var9) (var7, var1, 0x00000000);
  }
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00029868
 */
void sub_29868 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) arg1)[0] = 0x00000000;
  var2 = *((int *) 0x00048F1C);
  ((int *) var1)[1] = 0x00000000;
  var5 = scePaf_D27A723F (var2, "infotext1");
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) var5)[0];
    var7 = ((int *) var6)[46];
    var10 var11 = (*var7) (var5, var1, 0x00000000);
  }
  ra = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000298D0
 */
void sub_298D0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) arg1)[0] = 0x00000000;
  var2 = *((int *) 0x00048F1C);
  ((int *) var1)[1] = 0x00000000;
  var5 = scePaf_D27A723F (var2, "infotext2");
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) var5)[0];
    var7 = ((int *) var6)[46];
    var10 var11 = (*var7) (var5, var1, 0x00000000);
  }
  ra = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029938
 */
void sub_29938 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00048F64);
  var2 = var1 + 0x00000001;
  *((int *) 0x00048F64) = var2;
  if (var2 == 0x00000001)
  {
    var4 = *((int *) 0x00048FB0);
    var5 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (var4 == 0x00000000)
    {

    label13:
      ra = ((int *) sp)[1];
    }
    else
    {
      *((int *) 0x00048F68) = 0x00000000;
      scePaf_531031AD (var4, 0x00000001, 0x00000000);
      var8 = *((int *) 0x00048FB0);
      var9 = 0x4285554D;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x4285554D));
      scePaf_485890F9 (var8, 0x00000064, 0x00026B58, 0x00000000);
      var12 = *((int *) 0x00048FB0);
      sub_26B58 (var12);
      var15 = *((int *) 0x00048FB4);
      var16 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      scePaf_531031AD (var15, 0x00000001, 0x00000000);
      ra = ((int *) sp)[1];
    }
  }
  else
  goto label13;
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000299F4
 */
void sub_299F4 ()
{
  var1 = *((int *) 0x00048F64);
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var2 = var1 + 0xFFFFFFFF;
  ((int *) sp)[1] = ra;
  *((int *) 0x00048F64) = var2;
  if (var2 != 0x00000000)
  {

  label11:
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = *((int *) 0x00048FB0);
    var4 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (!(var3 != 0x00000000))
      goto label11;
    scePaf_4FEF4DB9 (var3, 0x00000001, 0x00000000);
    var8 = *((int *) 0x00048FB4);
    var9 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    scePaf_4FEF4DB9 (var8, 0x00000001, 0x00000000);
    var12 = *((int *) 0x00048FB0);
    var15 = scePaf_ED055C3C (var12, 0x00000064);
    ra = ((int *) sp)[1];
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00029A7C
 */
void sub_29A7C (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  var1 = 0xC2F40000;
  __asm__ ("mtc1       $at, $fpr1;"
    : 
    : "=r"(0xC2F40000));
  var2 = 0x43620000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x43620000));
  ((int *) sp)[15] = ra;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  ((int *) sp)[12] = s0;
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr01, 4($sp);"
    : 
    : "=r"(sp));
  if (arg1 == 0x00000000)
  {
    __asm__ ("swc1       $fpr01, 20($sp);"
      : 
      : "=r"(sp));
    var28 = 0x43620000;
    __asm__ ("mtc1       $at, $fpr1;"
      : 
      : "=r"(0x43620000));
    __asm__ ("swc1       $fpr01, 16($sp);"
      : 
      : "=r"(sp));

  label7:
    var26 = ((int *) sp)[4];
    var27 = ((int *) sp)[5];
    ((int *) sp)[0] = var26;
    ((int *) sp)[1] = var27;
  }
  else
  {
    if (arg1 == 0x00000001)
    {
      __asm__ ("swc1       $fpr01, 20($sp);"
        : 
        : "=r"(sp));
      var25 = 0x42840000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 16($sp);"
        : 
        : "=r"(0x42840000), "=r"(sp));
      goto label7;
    }
  }
  var3 = *((int *) 0x00048FB0);
  ra = ((int *) sp)[15];
  if (var3 == 0x00000000)
  {

  label25:
    var22 = ((int *) sp)[14];
  }
  else
  {
    var4 = *((int *) 0x00048FB4);
    if (var4 == 0x00000000)
    {
      var22 = ((int *) sp)[14];
    }
    else
    {
      __asm__ ("lwc1       $fpr02, 0($sp);");
      var5 = 0x43620000;
      __asm__ ("mtc1       $at, $fpr0;"
               "c.eq.s     $fpr02, $fpr00;"
        : 
        : "=r"(0x43620000));
      __asm__ ("bc1f       0x00029BE8;"
               "lwc1       $fpr01, 4($sp);");
      {

      label14:
        *((char *) 0x00048FE0) = 0x00000001;
      }
      else
      {
        var6 = 0xC2F40000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "c.eq.s     $fpr01, $fpr00;"
          : 
          : "=r"(0xC2F40000));
        __asm__ ("bc1f       0x00029BEC;");
          goto label14;
        *((char *) 0x00048FE0) = 0x00000000;
      }
      var7 = *((int *) 0x00048FB0);
      var8 = sp + 0x00000020;
      var9 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("swc1       $fpr02, 32($sp);"
               "swc1       $fpr00, 44($sp);"
               "swc1       $fpr01, 36($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      scePaf_07C50769 (var7, var8, 0x00000000);
      var14 = scePaf_ED055C3C (var7, 0x01000001);
      __asm__ ("lwc1       $fpr03, -28736($v0);"
               "lwc1       $fpr00, -28720($v1);");
      __asm__ ("lwc1       $fpr01, 4($a0);"
               "lwc1       $fpr02, 4($a1);"
               "sub.s      $fpr00, $fpr00, $fpr03;"
               "lwc1       $fpr03, 0($sp);"
               "sub.s      $fpr01, $fpr01, $fpr02;");
      var15 = *((int *) 0x00048FB4);
      __asm__ ("add.s      $fpr03, $fpr03, $fpr00;"
               "lwc1       $fpr00, 4($sp);");
      __asm__ ("add.s      $fpr00, $fpr00, $fpr01;");
      var16 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr1;"
               "swc1       $fpr03, 32($sp);"
               "swc1       $fpr01, 44($sp);"
               "swc1       $fpr00, 36($sp);"
               "swc1       $fpr03, 0($sp);"
               "swc1       $fpr00, 4($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      scePaf_07C50769 (var15, var8, 0x00000000);
      var21 = scePaf_ED055C3C (var15, 0x01000001);
      ra = ((int *) sp)[15];
      goto label25;
    }
  }
  var23 = ((int *) sp)[13];
  var24 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00029C2C
 */
void sub_29C2C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x00048F1C);
  var4 = scePaf_11FA6015 (var1, "page_busy", arg3);
  if ((arg1 & 0x000000FF) == 0x00000000)
  {
    ((char *) var4)[509] = 0x00000000;
    ((char *) var4)[510] = 0x00000000;
  }
  else
  {
    ((char *) var4)[510] = 0x00000001;
    ((char *) var4)[509] = 0x00000001;
  }
  scePaf_44653A84 (var4);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00029C90
 */
void sub_29C90 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = *((unsigned char *) 0x00048FF0);
  ((int *) sp)[0] = s0;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[3] = s3;
  ((int *) sp)[4] = ra;
  if (!(var1 == var2))
  {
    var3 = *((int *) 0x00048F1C);
    var6 = scePaf_D27A723F (var3, "square_label");
    var7 = *((int *) 0x00048F1C);
    if (!(var2 != 0x00000000))
    {
    }
    scePaf_5BC7BB59 (var7, var6, "anim_square_hide");
  }
  *((char *) 0x00048FF0) = var2;
  ra = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029D18
 */
void sub_29D18 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = 0x00000000;
  ((int *) sp)[1] = s1;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  var5 = scePaf_24691865 ();
  if (var5 == 0x00000000)
  {
    var1 = *((unsigned char *) 0x00048FF2);
    if (!(var1 == var2))
    {
      var17 = *((int *) 0x00048F1C);
      var20 = scePaf_D27A723F (var17, "circle_label");
      if (!(var2 != 0x00000000))
      {
      }
      var21 = *((int *) 0x00048F1C);
      scePaf_5BC7BB59 (var21, var20, "anim_circle_hide");
    }
    *((char *) 0x00048FF2) = var2;
  }
  else
  {
    if (var5 == 0x00000001)
    {
      var1 = *((unsigned char *) 0x00048FF1);
      if (!(var1 == var2))
      {
        var10 = *((int *) 0x00048F1C);
        var13 = scePaf_D27A723F (var10, "cross_label");
        if (!(var2 != 0x00000000))
        {
        }
        var14 = *((int *) 0x00048F1C);
        scePaf_5BC7BB59 (var14, var13, "anim_cross_hide");
      }
      *((char *) 0x00048FF1) = var2;
    }
  }
  ra = ((int *) sp)[4];
  var6 = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029E14
 */
void sub_29E14 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = 0x00000000;
  ((int *) sp)[1] = s1;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  var5 = scePaf_24691865 ();
  if (var5 == 0x00000000)
  {
    var1 = *((unsigned char *) 0x00048FF1);
    if (!(var1 == var2))
    {
      var17 = *((int *) 0x00048F1C);
      var20 = scePaf_D27A723F (var17, "cross_label");
      if (!(var2 != 0x00000000))
      {
      }
      var21 = *((int *) 0x00048F1C);
      scePaf_5BC7BB59 (var21, var20, "anim_cross_hide");
    }
    *((char *) 0x00048FF1) = var2;
  }
  else
  {
    if (var5 == 0x00000001)
    {
      var1 = *((unsigned char *) 0x00048FF2);
      if (!(var1 == var2))
      {
        var10 = *((int *) 0x00048F1C);
        var13 = scePaf_D27A723F (var10, "circle_label");
        if (!(var2 != 0x00000000))
        {
        }
        var14 = *((int *) 0x00048F1C);
        scePaf_5BC7BB59 (var14, var13, "anim_circle_hide");
      }
      *((char *) 0x00048FF2) = var2;
    }
  }
  ra = ((int *) sp)[4];
  var6 = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029F10
 */
void sub_29F10 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[4] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((unsigned char *) 0x00048FF3);
  if (!(var2 == var1))
  {
    var3 = *((int *) 0x00048F1C);
    var6 = scePaf_D27A723F (var3, "triangle_label");
    var7 = *((int *) 0x00048F1C);
    if (!(var1 != 0x00000000))
    {
    }
    scePaf_5BC7BB59 (var7, var6, "anim_triangle_hide");
  }
  *((char *) 0x00048FF3) = var1;
  ra = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029FA0
 */
void sub_29FA0 ()
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[32] = ra;
  ((int *) sp)[31] = s7;
  ((int *) sp)[30] = s6;
  ((int *) sp)[29] = s5;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  __asm__ ("swc1       $fpr22, 152($sp);"
           "swc1       $fpr21, 148($sp);"
           "swc1       $fpr20, 144($sp);"
    : 
    : "=r"(sp));
  var1 = *((int *) 0x00048F1C);
  var4 = scePaf_D27A723F (var1, "square_shadow");
  var5 = *((int *) 0x00048F1C);
  var6 = var4;
  var9 = scePaf_D27A723F (var5, "cross_shadow");
  var10 = *((int *) 0x00048F1C);
  var11 = var9;
  var14 = scePaf_D27A723F (var10, "circle_shadow");
  var15 = *((int *) 0x00048F1C);
  var16 = var14;
  var19 = scePaf_D27A723F (var15, "triangle_shadow");
  var20 = *((int *) 0x00048F1C);
  var21 = var19;
  var24 = scePaf_D27A723F (var20, "square_label");
  var25 = *((int *) 0x00048F1C);
  var26 = var24;
  var29 = scePaf_D27A723F (var25, "cross_label");
  var30 = *((int *) 0x00048F1C);
  var31 = var29;
  var34 = scePaf_D27A723F (var30, "circle_label");
  var35 = *((int *) 0x00048F1C);
  var36 = var34;
  var39 = scePaf_D27A723F (var35, "triangle_label");
  var40 = var39;
  var41 = ((int *) var26)[4];
  ra = ((int *) sp)[32];
  if (((var41 >> 12) & 0x00000001) != 0x00000000)
  {

  label60:
    var45 = ((int *) sp)[31];
  }
  else
  {
    var42 = ((int *) var31)[4];
    if (((var42 >> 12) & 0x00000001) != 0x00000000)
    {
      var45 = ((int *) sp)[31];
    }
    else
    {
      var43 = ((int *) var36)[4];
      if (((var43 >> 12) & 0x00000001) != 0x00000000)
      {
        var45 = ((int *) sp)[31];
      }
      else
      {
        var44 = ((int *) var40)[4];
        if (((var44 >> 12) & 0x00000001) == 0x00000000)
        {
          var53 = ((int *) var26)[0];
          var54 = 0x7FFFFFFF;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x7FFFFFFF), "=r"(sp));
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var55 = 0xC2440000;
          __asm__ ("mtc1       $at, $fpr22;"
                   "swc1       $fpr00, 8($sp);"
            : 
            : "=r"(0xC2440000), "=r"(sp));
          var56 = 0x41E80000;
          __asm__ ("mtc1       $at, $fpr20;"
                   "swc1       $fpr00, 12($sp);"
                   "swc1       $fpr00, 16($sp);"
                   "swc1       $fpr00, 20($sp);"
                   "swc1       $fpr00, 24($sp);"
                   "swc1       $fpr00, 28($sp);"
                   "swc1       $fpr00, 32($sp);"
                   "swc1       $fpr00, 36($sp);"
                   "swc1       $fpr00, 40($sp);"
                   "swc1       $fpr00, 44($sp);"
                   "swc1       $fpr00, 48($sp);"
                   "swc1       $fpr00, 52($sp);"
                   "swc1       $fpr00, 56($sp);"
                   "swc1       $fpr00, 60($sp);"
            : 
            : "=r"(0x41E80000), "=r"(sp));
          var57 = ((int *) var53)[38];
          var58 = sp;
          var61 var62 = (*var57) (var26, 0x00000012, var58);
          var63 = ((int *) var31)[0];
          var64 = sp + 0x00000010;
          var65 = ((int *) var63)[38];
          var68 var69 = (*var65) (var31, 0x00000012, var64);
          var70 = ((int *) var36)[0];
          var71 = sp + 0x00000020;
          var72 = ((int *) var70)[38];
          var75 var76 = (*var72) (var36, 0x00000012, var71);
          var77 = ((int *) var40)[0];
          var78 = sp + 0x00000030;
          var79 = ((int *) var77)[38];
          var82 var83 = (*var79) (var40, 0x00000012, var78);
          __asm__ ("lwc1       $fpr00, 0($sp);");
          var84 = 0xC35C0000;
          __asm__ ("mtc1       $at, $fpr1;"
            : 
            : "=r"(0xC35C0000));
          var85 = 0x41A00000;
          __asm__ ("mtc1       $at, $fpr5;"
                   "add.s      $fpr00, $fpr00, $fpr01;"
            : 
            : "=r"(0x41A00000));
          var86 = 0x436B0000;
          __asm__ ("mtc1       $at, $fpr1;"
            : 
            : "=r"(0x436B0000));
          var87 = 0x40E00000;
          __asm__ ("mtc1       $at, $fpr4;"
                   "add.s      $fpr02, $fpr00, $fpr05;"
                   "lwc1       $fpr00, 48($sp);"
                   "c.lt.s     $fpr22, $fpr02;"
                   "sub.s      $fpr01, $fpr01, $fpr00;"
                   "bc1f       0x0002A1E8;"
                   "sub.s      $fpr21, $fpr01, $fpr04;"
            : 
            : "=r"(0x40E00000));
          {
            __asm__ ("mov.s      $fpr22, $fpr02;");
          }
          __asm__ ("add.s      $fpr00, $fpr22, $fpr04;"
                   "lwc1       $fpr01, 16($sp);"
                   "add.s      $fpr00, $fpr00, $fpr01;"
                   "add.s      $fpr03, $fpr00, $fpr05;"
                   "c.lt.s     $fpr20, $fpr03;");
          __asm__ ("bc1tl      0x0002A208;");
          {
            __asm__ ("mov.s      $fpr20, $fpr03;");
          }
          __asm__ ("add.s      $fpr00, $fpr20, $fpr04;"
                   "lwc1       $fpr01, 32($sp);"
                   "add.s      $fpr00, $fpr00, $fpr01;"
                   "add.s      $fpr02, $fpr00, $fpr05;"
                   "c.lt.s     $fpr21, $fpr02;");
          __asm__ ("bc1f       0x0002A24C;");
          var88 = sp + 0x00000040;
          {

          label40:
            var90 = sp + 0x00000050;
          }
          else
          {
            __asm__ ("sub.s      $fpr00, $fpr02, $fpr21;"
                     "sub.s      $fpr20, $fpr20, $fpr00;"
                     "c.lt.s     $fpr20, $fpr03;");
            __asm__ ("bc1f       0x0002A250;");
            var89 = sp + 0x00000050;
            {
              __asm__ ("sub.s      $fpr00, $fpr03, $fpr20;"
                       "sub.s      $fpr22, $fpr22, $fpr00;");
              var88 = sp + 0x00000040;
              goto label40;
            }
          }
          var91 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          __asm__ ("swc1       $fpr00, 92($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[20] = 0x00000000;
          ((int *) sp)[21] = 0x00000000;
          ((int *) sp)[22] = 0x00000000;
          scePaf_A6810C75 (var88, var6, 0x00000000, var90);
          var94 = 0xC3630000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC3630000));
          __asm__ ("swc1       $fpr00, 64($sp);"
            : 
            : "=r"(sp));
          var95 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          scePaf_07C50769 (var6, var88, 0x00000000);
          var100 = scePaf_ED055C3C (var6, 0x01000001);
          var101 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          __asm__ ("swc1       $fpr22, 64($sp);"
            : 
            : "=r"(sp));
          scePaf_07C50769 (var11, var88, 0x00000000);
          var106 = scePaf_ED055C3C (var11, 0x01000001);
          var107 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          __asm__ ("swc1       $fpr20, 64($sp);"
            : 
            : "=r"(sp));
          scePaf_07C50769 (var16, var88, 0x00000000);
          var112 = scePaf_ED055C3C (var16, 0x01000001);
          var113 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr21, 64($sp);"
            : 
            : "=r"(sp));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          scePaf_07C50769 (var21, var88, 0x00000000);
          var118 = scePaf_ED055C3C (var21, 0x01000001);
          ra = ((int *) sp)[32];
        }
        goto label60;
      }
    }
  }
  var46 = ((int *) sp)[30];
  var47 = ((int *) sp)[29];
  var48 = ((int *) sp)[28];
  var49 = ((int *) sp)[27];
  var50 = ((int *) sp)[26];
  var51 = ((int *) sp)[25];
  var52 = ((int *) sp)[24];
  __asm__ ("lwc1       $fpr22, 152($sp);"
           "lwc1       $fpr21, 148($sp);"
           "lwc1       $fpr20, 144($sp);");
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0002A348
 */
void sub_2A348 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[13] = s5;
  var1 = arg1 << 0x00000001;
  ((int *) sp)[15] = s7;
  ((int *) sp)[10] = s2;
  var2 = arg2;
  ((int *) sp)[9] = s1;
  var3 = arg1;
  ((int *) sp)[8] = s0;
  ((int *) sp)[11] = s3;
  var4 = arg3;
  ((int *) sp)[16] = ra;
  ((int *) sp)[14] = s6;
  ((int *) sp)[12] = s4;
  sub_33668 (arg4, (((var1 + arg1) << 0x00000002) + 0x00048FF4));
  var7 = ((int *) arg4)[0];
  var8 = ((unsigned short *) var4)[0];
  var9 = ((unsigned short *) var7)[0];
  var10 = 0x00000000;
  if (var9 == var8)
  {
    var68 = scePaf_4DA06280 (var7, var4);
    var10 = (var68 < 0x00000001);
  }
  if ((var10 ^ 0x00000001) != 0x00000000)
  {

  label10:
    var13 = *((int *) 0x00048F1C);
    var16 = scePaf_D27A723F (var13, var2);
    var17 = *((int *) 0x00048F1C);
    if (var16 != 0x00000000)
    {
      var51 = scePaf_D27A723F (var17, var2);
      var52 = var51;
      var55 = scePaf_4C947D23 ();
      var56 = ((int *) var52)[0];
      var57 = ((int *) var56)[0];
      var60 var61 = (*var57) (var52, var55);
      if (var60 == 0x00000000)
      {
        var18 = 0x00000000;
      }
      else
      {
        var62 = *((int *) 0x00048F1C);
        var65 = scePaf_D27A723F (var62, var2);
        var18 = var65;
      }
    }
    else
    {
      var18 = 0x00000000;
    }
    if (var18 == 0x00000000)
    {

    label41:
      var12 = var1 + var3;
    }
    else
    {
      scePaf_CA38E212 (var18, 0x0002000C, 0x00029FA0, 0x00000000);
      scePaf_0034216F (var18);
      var23 = sp;
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_33618 (var23, var4);
      var26 = sp;
      var27 = ((int *) var18)[0];
      var28 = ((int *) var27)[45];
      var31 var32 = (*var28) (var18, var26, 0x00000000);
      var33 = sp;
      sub_335E8 (var33);
      var36 = ((int *) var18)[4];
      if (!(((var36 >> 12) & 0x00000001) == 0x00000000))
        goto label41;
      sub_29FA0 ();
      var12 = var1 + var3;
    }
  }
  else
  {
    var11 = ((unsigned char *) (var3 + 0x00049024))[0];
    var12 = var1 + var3;
    if (!(var11 == 0x00000000))
      goto label10;
  }
  sub_33618 (((var12 << 0x00000002) + 0x00048FF4), var4);
  ra = ((int *) sp)[16];
  var39 = ((int *) sp)[15];
  var40 = ((int *) sp)[14];
  var41 = ((int *) sp)[13];
  var42 = ((int *) sp)[12];
  var43 = ((int *) sp)[11];
  var44 = ((int *) sp)[10];
  var45 = ((int *) sp)[9];
  var46 = ((int *) sp)[8];
  ((char *) (var3 + 0x00049024))[0] = 0x00000000;
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002A51C
 */
void sub_2A51C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  sub_2A348 (0x00000000, "square_label", arg2, var1);
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002A568
 */
void sub_2A568 (int arg1, int arg2)
{
  ((int *) arg1)[0] = 0x00000000;
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = arg1;
  var4 = scePaf_24691865 ();
  var5 = "circle_label";
  var6 = 0x00000002;
  if (var4 == 0x00000000)
  {

  label7:
    sub_2A348 (var6, var5, arg2, var1);
  }
  else
  {
    var6 = 0x00000001;
    if (var4 == 0x00000001)
    {
      var5 = "cross_label";
      goto label7;
    }
    else
    {
    }
  }
  ra = ((int *) sp)[6];
  var7 = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002A5EC
 */
void sub_2A5EC (int arg1, int arg2)
{
  ((int *) arg1)[0] = 0x00000000;
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = arg1;
  var4 = scePaf_24691865 ();
  var5 = "cross_label";
  var6 = 0x00000001;
  if (var4 == 0x00000000)
  {

  label7:
    sub_2A348 (var6, var5, arg2, var1);
  }
  else
  {
    var6 = 0x00000002;
    if (var4 == 0x00000001)
    {
      var5 = "circle_label";
      goto label7;
    }
    else
    {
    }
  }
  ra = ((int *) sp)[6];
  var7 = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002A670
 */
void sub_2A670 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  sub_2A348 (0x00000003, "triangle_label", arg2, var1);
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002A6BC
 */
void sub_2A6BC ()
{
  var1 = 0x00000000;
  while (1) {
    var1 = var1 + 0x00000001;
    ((char *) (var1 + 0x00049024))[0] = 0x00000001;
    if (((var1 < 0x00000004)) != 0x00000000)
      continue;
    break;
  }
  return;
}

/**
 * Subroutine at address 0x0002A6E8
 */
void sub_2A6E8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg1 & 0x0000FFFF;
  ((int *) sp)[0] = ra;
  if (var1 == 0x00000045)
  {
    var21 = scePaf_24691865 ();
    if (var21 == 0x00000000)
    {

    label32:
      var9 = *((int *) 0x00047168);
    }
    else
    {
      var22 = *((int *) 0x00047168);

    label34:
    }

  label35:
    var8 = scePaf_970DC20D (var5, "msgsystem_cross_gaiji");
    ra = ((int *) sp)[0];
  }
  else
  {
    if (((var1 < 0x00000046)) == 0x00000000)
    {
      if (var1 == 0x00000062)
      {
        var17 = scePaf_24691865 ();
        if (var17 != 0x00000000)
        {

        label23:
          var14 = *((int *) 0x00047168);
        }
        else
        {
          var18 = *((int *) 0x00047168);

        label25:
        }
        goto label35;
      }
      else
      {
        if (var1 != 0x00000065)
        {

        label39:
          ra = ((int *) sp)[0];
        }
        else
        {
          var12 = scePaf_24691865 ();
          if (var12 == 0x00000000)
          {
            goto label23;
          }
          else
          {
            var13 = *((int *) 0x00047168);
            goto label25;
          }
          goto label35;
        }
      }
    }
    else
    {
      if (var1 == 0x00000042)
      {
        var4 = scePaf_24691865 ();
        if (var4 != 0x00000000)
        {
          goto label32;
        }
        else
        {
          var5 = *((int *) 0x00047168);
          goto label34;
        }
        goto label35;
      }
      else
      {
        goto label39;
      }
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002A7D0
 */
void sub_2A7D0 (int arg1, int arg2, int arg3, int arg4)
{
  __asm__ ("mtc1       $zr, $fpr0;");
  sp = sp + 0xFFFFFFD0;
  var1 = sp + 0x00000010;
  var2 = sp;
  ((int *) sp)[8] = ra;
  __asm__ ("swc1       $fpr00, 28($sp);"
           "swc1       $fpr00, 0($sp);"
           "swc1       $fpr00, 4($sp);"
           "swc1       $fpr00, 8($sp);"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr00, 16($sp);"
           "swc1       $fpr00, 20($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 24($sp);"
    : 
    : "=r"(sp));
  scePaf_D34FC43E (arg1, arg4, var2, 0x00000000, var1);
  ra = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002A81C
 */
void sub_2A81C (int arg1)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[17] = s1;
  var1 = *((int *) 0x00048F18);
  ((int *) sp)[16] = s0;
  var2 = arg1;
  ((int *) sp)[20] = ra;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  if (var1 != 0x00000000)
  {
    var9 = scePaf_11FA6015 (var1, "page_default_theme_3D", arg3);
    if (var9 == 0x00000000)
    {

    label26:
      ra = ((int *) sp)[20];
    }
    else
    {
      var12 = scePaf_E05C0B73 (var9, 0x00000000);
      var13 = *((int *) 0x00048F18);
      var14 = var12;
      var17 = scePaf_D27A723F (var13, "camera_target");
      var18 = var17;
      if (var2 == 0x00000000)
      {
        var38 = scePaf_ED055C3C (var14, 0x00000064);
        ra = ((int *) sp)[20];
      }
      else
      {
        var19 = sp;
        if (((var2 < 0x00000064)) == 0x00000000)
          goto label26;
        scePaf_15AFC8D3 (var19, 0x00000040, "anim_camera_%02d", var2);
        var22 = *((int *) 0x00048F18);
        var23 = sp;
        scePaf_5BC7BB59 (var22, var14, var23);
        var26 = sp;
        scePaf_15AFC8D3 (var26, 0x00000040, "anim_camera_target_%02d", var2);
        var29 = *((int *) 0x00048F18);
        var30 = sp;
        scePaf_5BC7BB59 (var29, var18, var30);
        var33 = 0x4205554D;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x4205554D));
        scePaf_485890F9 (var14, 0x00000064, 0x0002A7D0, var18);
        ra = ((int *) sp)[20];
      }
    }
  }
  else
  goto label26;
  var3 = ((int *) sp)[19];
  var4 = ((int *) sp)[18];
  var5 = ((int *) sp)[17];
  var6 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0002A940
 */
void sub_2A940 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00048FA0);
  if (!(var1 == 0x00000000))
  {
    var2 = var1;
    if ((arg1 & 0x000000FF) == 0x00000000)
    {
      ((char *) var1)[509] = 0x00000000;
      ((char *) var1)[510] = 0x00000000;
      scePaf_44653A84 (var2);
      var13 = *((int *) 0x00048FA4);
      ((char *) var13)[509] = 0x00000000;
      ((char *) var13)[510] = 0x00000000;
    }
    else
    {
      ((char *) var1)[509] = 0x00000001;
      ((char *) var1)[510] = 0x00000001;
      scePaf_44653A84 (var2);
      var5 = *((int *) 0x00048FA4);
      ((char *) var5)[510] = 0x00000001;
      ((char *) var5)[509] = 0x00000001;
    }
    scePaf_44653A84 (var5);
    sub_26EE8 ();
  }
  ra = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002A9CC
 */
void sub_2A9CC (int arg1)
{
  *((int *) 0x00049028) = (arg1 & 0x000000FF);
  return;
}

/**
 * Subroutine at address 0x0002A9DC
 */
void sub_2A9DC ()
{
  var1 = *((int *) 0x00049028);
  return;
}

/**
 * Subroutine at address 0x0002A9EC
 */
void sub_2A9EC (int arg1)
{
  *((char *) 0x0004902C) = arg1;
  return;
}

/**
 * Subroutine at address 0x0002A9F8
 */
void sub_2A9F8 ()
{
  var1 = *((unsigned char *) 0x0004902C);
  return;
}

/**
 * Subroutine at address 0x0002AA04
 */
void sub_2AA04 (int arg1)
{
  sp = sp + 0xFFFFFF90;
  *((int *) 0x00048F18) = arg1;
  ((int *) sp)[24] = ra;
  scePaf_904D869C (arg1, 0x00046E4C);
  var5 = ThreadManForUser_369ED59D ();
  var6 = sp;
  if (!((var5 & 0x00000001) == 0x00000000))
  {
    *((char *) 0x00048F4C) = 0x00000001;
  }
  var9 = IoFileMgrForUser_ACE946E8 ("flash0:/vsh/resource/01-12_03g.bmp", var6);
  ra = ((int *) sp)[24];
  *((char *) 0x00048FED) = ((var9 < 0x00000001));
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0002AA68
 */
void sub_2AA68 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = ra;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  sub_27620 (0x00000001, 0x00000000);
  __asm__ ("mtc1       $zr, $fpr20;");
  var3 = *((unsigned char *) 0x00048F92);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_28F64 (var3);
  var6 = *((unsigned char *) 0x00048F91);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_28E90 (var6);
  ra = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002AAB4
 */
void sub_2AAB4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_27A40 ();
  sub_27C60 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002AAD8
 */
void sub_2AAD8 ()
{
  return;
}

/**
 * Subroutine at address 0x0002AAE0
 */
void sub_2AAE0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x00048F1C) = arg1;
  scePaf_904D869C (arg1, 0x00046E7C);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002AB08
 */
void sub_2AB08 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[16] = s0;
  ((int *) sp)[21] = ra;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  __asm__ ("swc1       $fpr20, 96($sp);"
    : 
    : "=r"(sp));
  var1 = ((unsigned short *) arg2)[2];
  if (var1 == 0x00000401)
  {
    var14 = ((int *) arg1)[116];
    var15 = 0x7FFFFFFF;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x7FFFFFFF));
    __asm__ ("swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
             "swc1       $fpr00, 16($sp);"
             "swc1       $fpr00, 20($sp);"
             "swc1       $fpr00, 24($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    var18 = scePaf_E05C0B73 (var14, 0x00000000);
    var19 = ((int *) arg2)[4];
    if (var19 == 0x00000002)
    {
      var69 = 0x43620000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 32($sp);"
        : 
        : "=r"(0x43620000), "=r"(sp));
      var70 = 0xC3220000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3220000));
      var71 = 0x43B55555;
      __asm__ ("mtc1       $at, $fpr20;"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(0x43B55555), "=r"(sp));
      var72 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      var73 = 0x43640000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x43640000));
      var74 = ((int *) sp)[8];
      __asm__ ("swc1       $fpr00, 32($sp);"
        : 
        : "=r"(sp));
      var75 = 0xC3260000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3260000));
      var76 = ((int *) sp)[9];
      var77 = ((int *) sp)[11];
      __asm__ ("swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      ((int *) sp)[3] = var77;
      var78 = ((int *) sp)[9];
      var79 = ((int *) sp)[10];
      ((int *) sp)[1] = var76;
      ((int *) sp)[5] = var78;
      var80 = ((int *) sp)[8];
      var33 = ((int *) sp)[11];
      ((int *) sp)[0] = var74;
      ((int *) sp)[2] = var79;
      ((int *) sp)[4] = var80;
      ((int *) sp)[6] = var79;
    }
    else
    {
      var20 = *((unsigned char *) 0x00048FE0);
      var21 = 0x43880000;
      __asm__ ("mtc1       $at, $fpr20;"
        : 
        : "=r"(0x43880000));
      if (var20 != 0x00000000)
      {
        var52 = *((int *) 0x00048FB0);
        var53 = sp + 0x00000020;
        var54 = sp + 0x00000030;
        var55 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("swc1       $fpr00, 60($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        ((int *) sp)[14] = 0x00000000;
        scePaf_A6810C75 (var53, var52, 0x00000000, var54);
        var58 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var59 = ((int *) sp)[8];
        var60 = ((int *) sp)[10];
        var61 = ((int *) sp)[11];
        ((int *) sp)[0] = var59;
        var62 = ((int *) sp)[9];
        var63 = *((int *) 0x00048FB4);
        ((int *) sp)[1] = var62;
        ((int *) sp)[2] = var60;
        __asm__ ("swc1       $fpr00, 44($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[3] = var61;
        ((int *) sp)[8] = 0x00000000;
        ((int *) sp)[9] = 0x00000000;
        ((int *) sp)[10] = 0x00000000;
        scePaf_A6810C75 (var54, var63, 0x00000000, var53);
        var66 = ((int *) sp)[12];
        var67 = ((int *) sp)[13];
        ((int *) sp)[4] = var66;
        ((int *) sp)[5] = var67;
        var68 = ((int *) sp)[14];
        var33 = ((int *) sp)[15];
        ((int *) sp)[6] = var68;
      }
      else
      {
        var22 = 0x43620000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 48($sp);"
          : 
          : "=r"(0x43620000), "=r"(sp));
        var23 = 0xC2F40000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 52($sp);"
          : 
          : "=r"(0xC2F40000), "=r"(sp));
        var24 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("swc1       $fpr00, 60($sp);"
          : 
          : "=r"(sp));
        var25 = 0x43640000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x43640000));
        var26 = ((int *) sp)[12];
        ((int *) sp)[14] = 0x00000000;
        __asm__ ("swc1       $fpr00, 48($sp);"
          : 
          : "=r"(sp));
        var27 = 0xC2F80000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2F80000));
        var28 = ((int *) sp)[13];
        __asm__ ("swc1       $fpr00, 52($sp);"
          : 
          : "=r"(sp));
        var29 = ((int *) sp)[14];
        var30 = ((int *) sp)[15];
        ((int *) sp)[0] = var26;
        var31 = ((int *) sp)[12];
        ((int *) sp)[1] = var28;
        var32 = ((int *) sp)[13];
        ((int *) sp)[2] = var29;
        ((int *) sp)[3] = var30;
        ((int *) sp)[4] = var31;
        ((int *) sp)[6] = var29;
        ((int *) sp)[5] = var32;
        var33 = var30;
      }
    }
    __asm__ ("mov.s      $fpr13, $fpr20;");
    var34 = 0x43F00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43F00000));
    var35 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr14;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[7] = var33;
    scePaf_56D1B0AA (var18);
    var38 = *((int *) 0x00048FB0);
    var39 = sp;
    scePaf_07C50769 (var38, var39, 0x00000000);
    var44 = scePaf_ED055C3C (var38, 0x01000001);
    var45 = *((int *) 0x00048FB4);
    var46 = sp + 0x00000010;
    scePaf_07C50769 (var45, var46, 0x00000000);
    var51 = scePaf_ED055C3C (var45, 0x01000001);
    ra = ((int *) sp)[21];
  }
  else
  {
    if (var1 == 0x00000408)
    {
      var7 = ((int *) arg2)[3];
      if (var7 == 0x00000001)
      {
        var11 = *((unsigned char *) 0x00048F90);
        ra = ((int *) sp)[21];
        if (!(var11 != 0x00000000))
        {
          sub_29938 ();
          *((char *) 0x00048F90) = var7;

        label37:
          ra = ((int *) sp)[21];
        }
      }
      else
      {
        var8 = *((unsigned char *) 0x00048F90);
        ra = ((int *) sp)[21];
        if (!(var8 == 0x00000000))
        {
          sub_299F4 ();
          *((char *) 0x00048F90) = 0x00000000;
          goto label37;
        }
      }
    }
    else
    goto label37;
  }
  var2 = ((int *) sp)[20];
  var3 = ((int *) sp)[19];
  var4 = ((int *) sp)[18];
  var5 = ((int *) sp)[17];
  var6 = ((int *) sp)[16];
  __asm__ ("lwc1       $fpr20, 96($sp);");
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0002AE30
 */
void sub_2AE30 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[3] = s3;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned short *) arg2)[2];
  if (var2 == 0x00000401)
  {
    var7 = ((int *) arg2)[4];
    var8 = 0x43880000;
    __asm__ ("mtc1       $at, $fpr20;"
      : 
      : "=r"(0x43880000));
    if (var7 == 0x00000002)
    {
      var25 = 0x43B55555;
      __asm__ ("mtc1       $at, $fpr20;"
        : 
        : "=r"(0x43B55555));
    }
    var11 = scePaf_E05C0B73 (arg1, 0x00000000);
    __asm__ ("mov.s      $fpr13, $fpr20;");
    var12 = 0x43F00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43F00000));
    var13 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr14;"
      : 
      : "=r"(0xBF800000));
    var14 = var1 + 0x000001D8;
    scePaf_56D1B0AA (var11);
    var17 = ((int *) var14)[1];
    var18 = 0x00000000;
    if (var17 <= 0)
    {

    label18:
      ra = ((int *) sp)[4];
    }
    else
    {
      while (1) {
        var21 = scePaf_65E16DDC (var1, 0x00000000);
        scePaf_F6BB8C46 (var21, 0x00020000, arg2);
        var24 = ((int *) var14)[1];
        var18 = var18 + 0x00000001;
        if (!(((var18 < var24)) != 0x00000000))
          break;
        continue;
      }
      ra = ((int *) sp)[4];
    }
  }
  else
  goto label18;
  var3 = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002AF18
 */
void sub_2AF18 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = fp;
  ((int *) sp)[17] = ra;
  ((int *) sp)[15] = s7;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  var1 = *((int *) 0x00048F20);
  if (var1 == 0x00000000)
  {
    var157 = *((int *) 0x00048F1C);
    scePaf_27F4E35C (var157, "page_indicator", 0x00000000, 0x00000000);
    var160 = *((int *) 0x00048F1C);
    *((int *) 0x00048F5C) = 0x00000001;
    var163 = scePaf_D27A723F (var160, "battery");
    var164 = *((int *) 0x00048F1C);
    *((int *) 0x00048F94) = var163;
    var167 = scePaf_D27A723F (var164, "battery_shadow");
    var168 = *((int *) 0x00048F1C);
    *((int *) 0x00048F98) = var167;
    var171 = scePaf_D27A723F (var168, "clock");
    var172 = *((int *) 0x00048F1C);
    *((int *) 0x00048F9C) = var171;
    var175 = scePaf_D27A723F (var172, "mute");
    var176 = *((int *) 0x00048F1C);
    *((int *) 0x00048FA0) = var175;
    var179 = scePaf_D27A723F (var176, "mute_shadow");
    var180 = *((int *) 0x00048F1C);
    *((int *) 0x00048FA4) = var179;
    var183 = scePaf_D27A723F (var180, "hold");
    var184 = *((int *) 0x00048F1C);
    *((int *) 0x00048FA8) = var183;
    var187 = scePaf_D27A723F (var184, "hold_shadow");
    var188 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var189 = *((int *) 0x00048F94);
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var190 = 0x3E800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3E800000));
    var191 = ((int *) var189)[0];
    *((int *) 0x00048FAC) = var187;
    var192 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var193 = ((int *) var191)[30];
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    var196 var197 = (*var193) (var189, 0x00000017, var192, var191);
    var198 = *((int *) 0x00048F98);
    var199 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var200 = 0x3E800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3E800000));
    var201 = ((int *) var198)[0];
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var202 = sp;
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    var203 = ((int *) var201)[30];
    var206 var207 = (*var203) (var198, 0x00000017, var202);
    var208 = *((int *) 0x00048F9C);
    var209 = 0x447A0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x447A0000));
    scePaf_485890F9 (var208, 0x00000064, 0x00026994, 0x00000000);
    var212 = *((int *) 0x00048F9C);
    scePaf_CA38E212 (var212, 0x0002000C, 0x00026F28, 0x00000000);
    var215 = *((int *) 0x00048F9C);
    sub_26994 (var215);
    var218 = *((int *) 0x00048F94);
    var219 = 0x447A0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x447A0000));
    scePaf_485890F9 (var218, 0x00000064, 0x00026F44, 0x00000000);
    var222 = *((int *) 0x00048F94);
    sub_26F44 ();
    var225 = *((int *) 0x00048FA8);
    var226 = 0x447A0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x447A0000));
    scePaf_485890F9 (var225, 0x00000064, 0x000271D8, 0x00000000);
    var229 = *((int *) 0x00048FA8);
    sub_271D8 ();
    var232 = *((int *) 0x00048FA0);
    ((char *) var232)[509] = 0x00000000;
    ((char *) var232)[510] = 0x00000000;
    scePaf_44653A84 (var232);
    var235 = *((int *) 0x00048FA4);
    ((char *) var235)[509] = 0x00000000;
    ((char *) var235)[510] = 0x00000000;
    scePaf_44653A84 (var235);
    var238 = *((int *) 0x00048F1C);
  }
  else
  {
    *((int *) 0x00048F5C) = 0x00000000;
    var2 = *((int *) 0x00048F1C);
  }
  *((char *) 0x00048F60) = 0x00000000;
  scePaf_27F4E35C (var2, 0x0003AB00, 0x00000000, 0x00000000);
  var5 = *((int *) 0x00048F1C);
  var8 = scePaf_11FA6015 (var5, 0x0003AB00);
  scePaf_CA38E212 (var8, 0x00080005, 0x0002AB08, 0x00000000);
  var11 = *((int *) 0x00048F1C);
  var14 = scePaf_D27A723F (var11, "busy_icon");
  *((int *) 0x00048FB0) = var14;
  if (var14 != 0x00000000)
  {
    ((char *) var14)[509] = 0x00000000;
    ((char *) var14)[510] = 0x00000000;
    scePaf_44653A84 (var14);
    var147 = *((int *) 0x00048FB0);
    var148 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var149 = sp + 0x00000010;
    var150 = sp;
    ((int *) sp)[4] = 0x00000000;
    __asm__ ("swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[5] = 0x00000000;
    ((int *) sp)[6] = 0x00000000;
    scePaf_A6810C75 (var150, var147, 0x00000000, var149);
    var153 = ((int *) sp)[0];
    *((int *) 0x00048FC0) = var153;
    var154 = ((int *) sp)[3];
    *((int *) 0x00048FCC) = var154;
    var155 = ((int *) sp)[1];
    *((int *) 0x00048FC4) = var155;
    var156 = ((int *) sp)[2];
    *((int *) 0x00048FC8) = var156;
  }
  var15 = *((int *) 0x00048F1C);
  var18 = scePaf_D27A723F (var15, "busy_icon_shadow");
  *((int *) 0x00048FB4) = var18;
  if (var18 != 0x00000000)
  {
    ((char *) var18)[509] = 0x00000000;
    ((char *) var18)[510] = 0x00000000;
    scePaf_44653A84 (var18);
    var135 = *((int *) 0x00048FB4);
    var136 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var137 = sp + 0x00000010;
    var138 = sp;
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    scePaf_A6810C75 (var137, var135, 0x00000000, var138);
    var141 = ((int *) sp)[4];
    *((int *) 0x00048FD0) = var141;
    var142 = ((int *) sp)[7];
    *((int *) 0x00048FDC) = var142;
    var143 = ((int *) sp)[5];
    *((int *) 0x00048FD4) = var143;
    var144 = ((int *) sp)[6];
    *((int *) 0x00048FD8) = var144;
  }
  var19 = *((int *) 0x00048F1C);
  *((char *) 0x00048FE0) = 0x00000000;
  scePaf_27F4E35C (var19, 0x0003ACD0, 0x00000000, 0x00000000);
  var22 = *((int *) 0x00048F1C);
  var25 = scePaf_D27A723F (var22, 0x0003ACD0);
  var26 = var25;
  if (!(var25 == 0x00000000))
  {
    var27 = ((int *) var25)[0];
    __asm__ ("mtc1       $zr, $fpr12;");
    var28 = ((int *) var27)[22];
    var31 var32 = (*var28) (var26, 0x00000001);
    var35 = scePaf_ED055C3C (var26, 0x01000003);
  }
  var38 = scePaf_2338483F ();
  var39 = ((int *) var38)[38];
  sub_2A6BC ();
  var42 = *((int *) 0x00048F98);
  if (var42 != 0x00000000)
  {
    var127 = ((int *) var42)[0];
    var128 = ((int *) var127)[28];
    var131 var132 = (*var128) (var42, 0x00000006, 0x0000000B);
    var43 = *((int *) 0x00048FA4);
  }
  else
  {
    var43 = *((int *) 0x00048FA4);
  }
  if (var43 != 0x00000000)
  {
    var121 = ((int *) var43)[0];
    var122 = ((int *) var121)[28];
    var125 var126 = (*var122) (var43, 0x00000006, 0x0000000B);
    var44 = *((int *) 0x00048FAC);
  }
  else
  {
    var44 = *((int *) 0x00048FAC);
  }
  if (var44 != 0x00000000)
  {
    var115 = ((int *) var44)[0];
    var116 = ((int *) var115)[28];
    var119 var120 = (*var116) (var44, 0x00000006, 0x0000000B);
    var45 = *((int *) 0x00048FB4);
  }
  else
  {
    var45 = *((int *) 0x00048FB4);
  }
  if (var45 != 0x00000000)
  {
    var108 = ((int *) var45)[0];
    var109 = ((int *) var108)[28];
    var112 var113 = (*var109) (var45, 0x00000006, 0x0000000B);
    var114 = *((int *) 0x00048F1C);
  }
  else
  {
    var46 = *((int *) 0x00048F1C);
  }
  var49 = scePaf_D27A723F (var46, "square_shadow");
  if (!(var49 == 0x00000000))
  {
    var50 = ((int *) var49)[0];
    var51 = ((int *) var50)[28];
    var54 var55 = (*var51) (var49, 0x00000006, 0x0000000B);
  }
  var56 = *((int *) 0x00048F1C);
  var59 = scePaf_D27A723F (var56, "cross_shadow");
  if (!(var59 == 0x00000000))
  {
    var60 = ((int *) var59)[0];
    var61 = ((int *) var60)[28];
    var64 var65 = (*var61) (var59, 0x00000006, 0x0000000B);
  }
  var66 = *((int *) 0x00048F1C);
  var69 = scePaf_D27A723F (var66, "circle_shadow");
  if (!(var69 == 0x00000000))
  {
    var70 = ((int *) var69)[0];
    var71 = ((int *) var70)[28];
    var74 var75 = (*var71) (var69, 0x00000006, 0x0000000B);
  }
  var76 = *((int *) 0x00048F1C);
  var79 = scePaf_D27A723F (var76, "triangle_shadow");
  if (!(var79 == 0x00000000))
  {
    var80 = ((int *) var79)[0];
    var81 = ((int *) var80)[28];
    var84 var85 = (*var81) (var79, 0x00000006, 0x0000000B);
  }
  var86 = *((int *) 0x00048F20);
  var87 = *((int *) 0x00048F1C);
  if (var86 == 0x00000000)
  {
    scePaf_27F4E35C (var87, 0x0003ACE0, 0x00000000, 0x00000000);
    var102 = *((int *) 0x00048F1C);
    var105 = scePaf_11FA6015 (var102, 0x0003ACE0);
    scePaf_CA38E212 (var105, 0x00080005, 0x0002AE30, 0x00000000);
  }
  else
  {
  }
  __asm__ ("mtc1       $zr, $fpr12;");
  var88 = *((unsigned char *) 0x00048F93);
  sub_2937C (var88);
  ra = ((int *) sp)[17];
  var91 = ((int *) sp)[16];
  var92 = ((int *) sp)[15];
  var93 = ((int *) sp)[14];
  var94 = ((int *) sp)[13];
  var95 = ((int *) sp)[12];
  var96 = ((int *) sp)[11];
  var97 = ((int *) sp)[10];
  var98 = ((int *) sp)[9];
  var99 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002B534
 */
void sub_2B534 ()
{
  return;
}

/**
 * Subroutine at address 0x0002B53C
 */
void sub_2B53C (int arg1)
{
  sp = sp + 0xFFFFFEF0;
  ((int *) sp)[59] = s3;
  ((int *) sp)[65] = ra;
  ((int *) sp)[60] = s4;
  var1 = sp + 0x00000008;
  ((int *) sp)[58] = s2;
  ((int *) sp)[57] = s1;
  var2 = arg1;
  *((int *) 0x00047168) = arg1;
  ((int *) sp)[64] = fp;
  ((int *) sp)[63] = s7;
  ((int *) sp)[62] = s6;
  ((int *) sp)[61] = s5;
  ((int *) sp)[56] = s0;
  scePaf_904D869C (arg1, 0x00049030);
  scePaf_918CB54A (var2, 0x00000001, 0x00046E94);
  var7 = sp;
  scePaf_74FA9C70 (var7, var2, "main_module");
  var10 = sp;
  var13 = scePaf_4DF95F22 (var10);
  *((int *) 0x00048F20) = var13;
  sub_317D8 (var1);
  scePaf_E44CA200 (0x0002A6E8);
  var18 = *((int *) 0x00048F20);
  var19 = sp + 0x00000020;
  if (var18 == 0x00000000)
  {
    scePaf_5A693901 (var19);
    var20 = sp + 0x0000002C;
    sub_318F0 (var19, "system_plugin_bg");
    sub_318F0 (var20, "system_plugin");
    ((int *) sp)[14] = 0x0002AA04;
    var21 = sp + 0x00000048;
    ((int *) sp)[15] = 0x0002AA68;
    ((int *) sp)[16] = 0x0002AAB4;
    var22 = sp + 0x00000064;
    ((int *) sp)[17] = 0x0002AAD8;
    sub_318F0 (var21, "flash0:/vsh/resource/system_plugin_bg.rco");
    var121 = *((int *) 0x00047168);
    var122 = ((int *) var121)[103];
    ((int *) sp)[22] = 0x000000FD;
    ((int *) sp)[24] = var122;
    ((int *) sp)[33] = 0x0000000C;
    scePaf_36C437F1 (var19, 0x00000000);
    var125 = sp + 0x00000070;
    sub_317D8 (var125);
    sub_31808 (var22);
    sub_317D8 (var21);
    sub_317D8 (var20);
    sub_317D8 (var19);
  }
  else
  {
    var20 = sp + 0x0000002C;
    var21 = sp + 0x00000048;
    var22 = sp + 0x00000064;
  }
  scePaf_5A693901 (var19);
  sub_318F0 (var19, "system_plugin_fg");
  sub_318F0 (var20, "system_plugin");
  ((int *) sp)[14] = 0x0002AAE0;
  ((int *) sp)[15] = 0x0002AF18;
  ((int *) sp)[17] = 0x0002B534;
  sub_318F0 (var21, "flash0:/vsh/resource/system_plugin_fg.rco");
  var31 = *((int *) 0x00047168);
  var32 = *((int *) 0x00048F20);
  ((int *) sp)[22] = 0x00000002;
  var33 = 0x0000000C;
  var34 = ((int *) var31)[103];
  ((int *) sp)[24] = var34;
  if (!(var32 == 0x00000000))
  {
    var33 = 0x00000004;
  }
  ((int *) sp)[33] = var33;
  scePaf_36C437F1 (var19, 0x00000000);
  var37 = sp + 0x00000070;
  sub_317D8 (var37);
  sub_31808 (var22);
  sub_317D8 (var21);
  sub_317D8 (var20);
  sub_317D8 (var19);
  var48 = sp;
  scePaf_74FA9C70 (var48, var2, "color_mode");
  var51 = sp;
  var54 = scePaf_4DF95F22 (var51);
  *((int *) 0x00048F24) = var54;
  sub_317D8 (var1);
  var57 = sp;
  scePaf_74FA9C70 (var57, var2, "system_color");
  var60 = sp;
  var63 = scePaf_4DF95F22 (var60);
  *((int *) 0x00048F28) = var63;
  var64 = sp + 0x00000090;
  sub_317D8 (var1);
  *((char *) 0x00048F2C) = 0x00000000;
  *((char *) 0x00048F2D) = 0x00000000;
  ((int *) sp)[52] = 0x00000000;
  sceVshCommonUtil_D87E8E2D (var64, "/CONFIG/SYSTEM/XMB/THEME");
  var69 = sp + 0x000000D0;
  var72 = sceVshCommonUtil_7A73DC84 (var64, "wallpaper_mode", var69);
  var73 = ((int *) sp)[52];
  if (var72 != 0x00000000)
  {
    vsh_E5463CE5 (0x00000001);
  }
  else
  {
    if (var73 != 0x00000000)
    {
      if (var73 != 0x00000004)
      {
      }
      else
      {
        *((int *) 0x00048F30) = 0x00000001;
      }
    }
    else
    {
      *((int *) 0x00048F30) = 0x00000000;
    }
  }
  sceVshCommonUtil_625A9A5D (var64);
  sub_2728C ();
  *((int *) 0x00048F8C) = 0xFFFFFFFF;
  *((int *) 0x00048F64) = 0x00000000;
  *((int *) 0x00048F6C) = 0xFFFFFFFF;
  *((int *) 0x00048F70) = 0xFFFFFFFF;
  sceVshCommonUtil_D87E8E2D (var64, "/CONFIG/SYSTEM");
  var82 = sceVshCommonUtil_7A73DC84 (var64, "usb_auto_connect", 0x00049028);
  if (var82 != 0x00000000)
  {
    vsh_E5463CE5 (0x00000001);
  }
  else
  {
  }
  var83 = sp + 0x000000B0;
  sceVshCommonUtil_625A9A5D (var64);
  scePaf_6439FDBC (var83, 0x00000000, 0x00000011);
  sceVshCommonUtil_D87E8E2D (var64, "/CONFIG/NP");
  var92 = sceVshCommonUtil_5750B4DE (var64, "account_id", var83, 0x00000010);
  if (var92 == 0x00000000)
  {
    var108 = scePaf_967A56EF (var83);
    *((char *) 0x0004902C) = ((0x00000000 < var108));
  }
  else
  {
    vsh_E5463CE5 (0x00000001);
  }
  sceVshCommonUtil_625A9A5D (var64);
  ra = ((int *) sp)[65];
  var97 = ((int *) sp)[64];
  var98 = ((int *) sp)[63];
  var99 = ((int *) sp)[62];
  var100 = ((int *) sp)[61];
  var101 = ((int *) sp)[60];
  var102 = ((int *) sp)[59];
  var103 = ((int *) sp)[58];
  var104 = ((int *) sp)[57];
  var105 = ((int *) sp)[56];
  sp = sp + 0x00000110;
  return;
}

/**
 * Subroutine at address 0x0002B944
 */
void sub_2B944 ()
{
  return;
}

/**
 * Subroutine at address 0x0002B94C
 */
void sub_2B94C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_063C0 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002B96C
 */
void sub_2B96C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_063C0 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002B98C
 */
void sub_2B98C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = !((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004;
  var2 = *((int *) 0x0004903C);
  var3 = var2 + 0x00000001;
  *((int *) 0x0004903C) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var9, "flash0:/kd/ifhandle.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0004907C) = var9;
    var14 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var14, "flash0:/kd/pspnet.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x00049080) = var14;
    var19 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var19, "flash0:/kd/pspnet_inet.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x00049084) = var19;
    var24 = sceNet_39AF39A6 (0x0004B000, 0x0000001E, 0x00001000, 0x0000001E, 0x00001000);
    var4 = var24;
    if (!(var24 != 0x00000000))
    {
      var27 = sceNetInet_17943399 ();
      var4 = var27;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002BAB4
 */
void sub_2BAB4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0004903C);
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (var1 == 0x00000001)
  {
    var11 = sceNetInet_A9ED66B9 ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var14 = sceNet_281928A9 ();
      var2 = var14;
      if (!(var14 != 0x00000000))
      {
        var15 = *((int *) 0x00049084);
        if (var15 != 0x00000000)
        {
          scePaf_7B15E9DC (var15);
          scePaf_4508F2FA (var15);
        }
        else
        {
        }
        var16 = *((int *) 0x00049080);
        *((int *) 0x00049084) = 0x00000000;
        if (var16 != 0x00000000)
        {
          scePaf_7B15E9DC (var16);
          scePaf_4508F2FA (var16);
        }
        else
        {
        }
        var17 = *((int *) 0x0004907C);
        *((int *) 0x00049080) = 0x00000000;
        if (var17 != 0x00000000)
        {
          scePaf_7B15E9DC (var17);
          scePaf_4508F2FA (var17);
          *((int *) 0x0004907C) = 0x00000000;
        }
        else
        {
          *((int *) 0x0004907C) = 0x00000000;
        }

      label30:
        var3 = *((int *) 0x0004903C);
        *((int *) 0x0004903C) = (var3 + 0xFFFFFFFF);
      }
    }
  }
  else
  goto label30;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002BBB4
 */
void sub_2BBB4 ()
{
  var1 = *((int *) 0x0004903C);
  return;
}

/**
 * Subroutine at address 0x0002BBC4
 */
void sub_2BBC4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = 0x00000000;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  var3 = *((int *) 0x00049040);
  var4 = var3 + 0x00000001;
  *((int *) 0x00049040) = var4;
  if (var4 == 0x00000001)
  {
    var11 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var11, "flash0:/kd/memab.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0004908C) = var11;
    var16 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var16, "flash0:/kd/pspnet_adhoc.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x00049090) = var16;
    var21 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var21, "flash0:/kd/pspnet_adhoc_auth.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x00049094) = var21;
    var26 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var26, "flash0:/kd/pspnet_adhocctl.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x00049088) = var26;
    scePaf_6439FDBC (0x0004906C, 0x00000000, 0x00000010);
    if (var2 == 0x00000000)
    {
    }
    scePaf_ACB55E4C (0x00049070, var2, 0x00000009);
    var35 = sceNetAdhocctl_E26F226E (0x00080000, 0x0000001E, 0x0004906C);
    var1 = var35;
  }
  ra = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002BD44
 */
void sub_2BD44 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00049040);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  if (var1 == 0x00000001)
  {
    var11 = sceNetAdhocctl_9D689E13 ();
    var12 = *((int *) 0x00049088);
    var2 = var11;
    if (var12 != 0x00000000)
    {
      scePaf_7B15E9DC (var12);
      scePaf_4508F2FA (var12);
    }
    else
    {
    }
    var13 = *((int *) 0x00049094);
    *((int *) 0x00049088) = 0x00000000;
    if (var13 != 0x00000000)
    {
      scePaf_7B15E9DC (var13);
      scePaf_4508F2FA (var13);
    }
    else
    {
    }
    var14 = *((int *) 0x00049090);
    *((int *) 0x00049094) = 0x00000000;
    if (var14 != 0x00000000)
    {
      scePaf_7B15E9DC (var14);
      scePaf_4508F2FA (var14);
    }
    else
    {
    }
    var15 = *((int *) 0x0004908C);
    *((int *) 0x00049090) = 0x00000000;
    if (var15 != 0x00000000)
    {
      scePaf_7B15E9DC (var15);
      scePaf_4508F2FA (var15);
      *((int *) 0x0004908C) = 0x00000000;
    }
    else
    {
      *((int *) 0x0004908C) = 0x00000000;
    }
  }
  var3 = *((int *) 0x00049040);
  ra = ((int *) sp)[5];
  *((int *) 0x00049040) = (var3 + 0xFFFFFFFF);
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002BE50
 */
void sub_2BE50 ()
{
  var1 = *((int *) 0x00049040);
  return;
}

/**
 * Subroutine at address 0x0002BE60
 */
int sub_2BE60 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = !((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004;
  var2 = *((int *) 0x00049044);
  var3 = var2 + 0x00000001;
  *((int *) 0x00049044) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var9, "flash0:/kd/pspnet_apctl.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x00049098) = var9;
    var14 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var14, "flash0:/kd/pspnet_resolver.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0004909C) = var14;
    var19 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var19, "flash0:/kd/libparse_http.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x000490A8) = var19;
    var24 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var24, "flash0:/kd/libparse_uri.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x000490A4) = var24;
    var29 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var29, "flash0:/kd/libhttp.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x000490A0) = var29;
    var34 = sceNetApctl_E2F91F9B (0x00008000, 0x00000021);
    var4 = var34;
    if (!(var34 != 0x00000000))
    {
      var37 = sceNetResolver_F3370E61 ();
      var4 = var37;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0002BFE0
 */
int sub_2BFE0 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049044);
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (var1 == 0x00000001)
  {
    var11 = sceNetResolver_6138194A ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var14 = sceNetApctl_B3EDD0EC ();
      var2 = var14;
      if (!(var14 != 0x00000000))
      {
        var15 = *((int *) 0x000490A0);
        if (var15 != 0x00000000)
        {
          scePaf_7B15E9DC (var15);
          scePaf_4508F2FA (var15);
        }
        else
        {
        }
        var16 = *((int *) 0x000490A4);
        *((int *) 0x000490A0) = 0x00000000;
        if (var16 != 0x00000000)
        {
          scePaf_7B15E9DC (var16);
          scePaf_4508F2FA (var16);
        }
        else
        {
        }
        var17 = *((int *) 0x000490A8);
        *((int *) 0x000490A4) = 0x00000000;
        if (var17 != 0x00000000)
        {
          scePaf_7B15E9DC (var17);
          scePaf_4508F2FA (var17);
        }
        else
        {
        }
        var18 = *((int *) 0x0004909C);
        *((int *) 0x000490A8) = 0x00000000;
        if (var18 != 0x00000000)
        {
          scePaf_7B15E9DC (var18);
          scePaf_4508F2FA (var18);
        }
        else
        {
        }
        var19 = *((int *) 0x00049098);
        *((int *) 0x0004909C) = 0x00000000;
        if (var19 != 0x00000000)
        {
          scePaf_7B15E9DC (var19);
          scePaf_4508F2FA (var19);
          *((int *) 0x00049098) = 0x00000000;
        }
        else
        {
          *((int *) 0x00049098) = 0x00000000;
        }

      label44:
        var3 = *((int *) 0x00049044);
        *((int *) 0x00049044) = (var3 + 0xFFFFFFFF);
      }
    }
  }
  else
  goto label44;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var2;
}

/**
 * Subroutine at address 0x0002C130
 */
void sub_2C130 ()
{
  var1 = *((int *) 0x00049044);
  return;
}

/**
 * Subroutine at address 0x0002C140
 */
int sub_2C140 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049048);
  var2 = var1 + 0x00000001;
  *((int *) 0x00049048) = var2;
  var3 = 0x00000000;
  if (var2 == 0x00000001)
  {
    var8 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var8, "flash0:/kd/cert_loader.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x000490B4) = var8;
    var13 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var13, "flash0:/kd/libssl.prx", 0x00000000, (!((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
    *((int *) 0x000490B8) = var13;
    var18 = sceSsl_957ECBE2 (0x00040000);
    var3 = var18;
  }
  ra = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x0002C210
 */
int sub_2C210 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049048);
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (var1 == 0x00000001)
  {
    var11 = sceSsl_191CDEFF ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var12 = *((int *) 0x000490B8);
      if (var12 != 0x00000000)
      {
        scePaf_7B15E9DC (var12);
        scePaf_4508F2FA (var12);
        var13 = *((int *) 0x000490B4);
      }
      else
      {
        var13 = *((int *) 0x000490B4);
      }
      *((int *) 0x000490B8) = 0x00000000;
      if (var13 != 0x00000000)
      {
        scePaf_7B15E9DC (var13);
        scePaf_4508F2FA (var13);
        *((int *) 0x000490B4) = 0x00000000;
      }
      else
      {
        *((int *) 0x000490B4) = 0x00000000;
      }

    label20:
      var3 = *((int *) 0x00049048);
      *((int *) 0x00049048) = (var3 + 0xFFFFFFFF);
    }
  }
  else
  goto label20;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var2;
}

/**
 * Subroutine at address 0x0002C2D8
 */
void sub_2C2D8 ()
{
  var1 = *((int *) 0x00049048);
  return;
}

/**
 * Subroutine at address 0x0002C2E8
 */
void sub_2C2E8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[3] = ra;
  ((int *) sp)[0] = s0;
  var2 = *((int *) 0x0004904C);
  var3 = var2 + 0x00000001;
  *((int *) 0x0004904C) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var10 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var10, "flash0:/kd/mcctrl.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x000490AC) = var10;
    var15 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var15, "flash0:/kd/libdnas_core.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x000490B0) = var15;
    var20 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var20, "flash0:/kd/libdnas.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
    *((int *) 0x000490BC) = var20;
    var25 = sub_2C140 (var1);
    var4 = var25;
  }
  ra = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002C3F4
 */
void sub_2C3F4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0004904C);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    var11 = sub_2C210 ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var12 = *((int *) 0x000490BC);
      if (var12 != 0x00000000)
      {
        scePaf_7B15E9DC (var12);
        scePaf_4508F2FA (var12);
      }
      else
      {
      }
      var13 = *((int *) 0x000490B0);
      *((int *) 0x000490BC) = 0x00000000;
      if (var13 != 0x00000000)
      {
        scePaf_7B15E9DC (var13);
        scePaf_4508F2FA (var13);
      }
      else
      {
      }
      var14 = *((int *) 0x000490AC);
      *((int *) 0x000490B0) = 0x00000000;
      if (var14 != 0x00000000)
      {
        scePaf_7B15E9DC (var14);
        scePaf_4508F2FA (var14);
        *((int *) 0x000490AC) = 0x00000000;
      }
      else
      {
        *((int *) 0x000490AC) = 0x00000000;
      }

    label27:
      var3 = *((int *) 0x0004904C);
      *((int *) 0x0004904C) = (var3 + 0xFFFFFFFF);
    }
  }
  else
  goto label27;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002C4E4
 */
void sub_2C4E4 ()
{
  var1 = *((int *) 0x0004904C);
  return;
}

/**
 * Subroutine at address 0x0002C4F4
 */
int sub_2C4F4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x00049050);
  var2 = var1 + 0x00000001;
  *((int *) 0x00049050) = var2;
  var3 = 0x00000000;
  if (var2 == 0x00000001)
  {
    var6 = sub_2BE60 ((arg1 & 0x000000FF));
    var3 = var6;
    if (!(var6 != 0x00000000))
    {
      var9 = sceHttp_AB1ABE07 (0x00025800);
      var3 = var9;
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x0002C554
 */
int sub_2C554 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049050);
  ((int *) sp)[1] = ra;
  var2 = 0x00000000;
  if (var1 == 0x00000001)
  {
    var7 = sceHttp_D1C8945E ();
    var2 = var7;
    if (!(var7 != 0x00000000))
    {
      var10 = sub_2BFE0 ();
      var2 = var10;
      if (!(var10 != 0x00000000))
      {
        var3 = *((int *) 0x00049050);

      label11:
        *((int *) 0x00049050) = (var3 + 0xFFFFFFFF);
      }
    }
  }
  else
  {
    var3 = *((int *) 0x00049050);
    goto label11;
  }
  ra = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x0002C5BC
 */
void sub_2C5BC ()
{
  var1 = *((int *) 0x00049050);
  return;
}

/**
 * Subroutine at address 0x0002C5CC
 */
int sub_2C5CC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[1] = ra;
  var2 = *((int *) 0x00049054);
  var3 = var2 + 0x00000001;
  *((int *) 0x00049054) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var8 = sub_2C140 (var1);
    var4 = var8;
    if (!(var8 != 0x00000000))
    {
      var11 = sub_2C4F4 (var1);
      var4 = var11;
      if (!(var11 != 0x00000000))
      {
        var14 = sceHttp_E4D21302 (0x00000000, 0x00000000, 0x00000000, 0x00000000);
        var4 = var14;
        if (!(var14 != 0x00000000))
        {
          var17 = sceHttp_87797BDD (0x00000000, 0x00000000);
          var4 = MIN (var17, 0x00000000);
        }
      }
    }
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0002C674
 */
int sub_2C674 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049054);
  ((int *) sp)[1] = ra;
  var2 = 0x00000000;
  if (var1 == 0x00000001)
  {
    var7 = sceHttp_F9D8EB63 ();
    var2 = var7;
    if (!(var7 != 0x00000000))
    {
      var10 = sub_2C554 ();
      var2 = var10;
      if (!(var10 != 0x00000000))
      {
        var13 = sub_2C210 ();
        var2 = var13;
        if (!(var13 != 0x00000000))
        {
          var3 = *((int *) 0x00049054);

        label14:
          *((int *) 0x00049054) = (var3 + 0xFFFFFFFF);
        }
      }
    }
  }
  else
  {
    var3 = *((int *) 0x00049054);
    goto label14;
  }
  ra = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x0002C6EC
 */
void sub_2C6EC ()
{
  var1 = *((int *) 0x00049054);
  return;
}

/**
 * Subroutine at address 0x0002C6FC
 */
int sub_2C6FC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x00049058);
  var3 = var2 + 0x00000001;
  *((int *) 0x00049058) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_2C5CC (var1);
    var4 = var9;
    if (!(var9 != 0x00000000))
    {
      var12 = scePaf_48BB05D5 (0x00000004);
      scePaf_79B2405B (var12, "flash0:/kd/np_core.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      *((int *) 0x000490C0) = var12;
      var17 = scePaf_48BB05D5 (0x00000004);
      scePaf_79B2405B (var17, "flash0:/kd/np.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x000490C4) = var17;
      var22 = sceNp_857B47D3 ();
      var4 = var22;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0002C7D4
 */
int sub_2C7D4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00049058);
  ((int *) sp)[3] = s3;
  var2 = 0x00000000;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (var1 == 0x00000001)
  {
    sceNp_37E1E274 ();
    var10 = *((int *) 0x000490C4);
    if (var10 != 0x00000000)
    {
      scePaf_7B15E9DC (var10);
      scePaf_4508F2FA (var10);
      var11 = *((int *) 0x000490C0);
    }
    else
    {
      var11 = *((int *) 0x000490C0);
    }
    *((int *) 0x000490C4) = 0x00000000;
    if (var11 != 0x00000000)
    {
      scePaf_7B15E9DC (var11);
      scePaf_4508F2FA (var11);
    }
    *((int *) 0x000490C0) = 0x00000000;
    var14 = sub_2C674 ();
    var2 = var14;
    if (!(var14 != 0x00000000))
    {
      var3 = *((int *) 0x00049058);

    label23:
      *((int *) 0x00049058) = (var3 + 0xFFFFFFFF);
    }
  }
  else
  {
    var3 = *((int *) 0x00049058);
    goto label23;
  }
  ra = ((int *) sp)[4];
  var4 = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var2;
}

/**
 * Subroutine at address 0x0002C8A0
 */
void sub_2C8A0 ()
{
  var1 = *((int *) 0x00049058);
  return;
}

/**
 * Subroutine at address 0x0002C8B0
 */
int sub_2C8B0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x0004905C);
  var3 = var2 + 0x00000001;
  *((int *) 0x0004905C) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_2C6FC (var1);
    var4 = var9;
    if (!(var9 < 0))
    {
      var12 = scePaf_48BB05D5 (0x00000004);
      scePaf_79B2405B (var12, "flash0:/kd/np_auth.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x000490C8) = var12;
      var17 = sceNpAuth_A1DE86F8 (0x00020000, 0x00003C00, 0x00000028);
      var4 = var17;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0002C960
 */
int sub_2C960 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0004905C);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    sceNpAuth_4EC1F667 ();
    var9 = *((int *) 0x000490C8);
    if (var9 != 0x00000000)
    {
      scePaf_7B15E9DC (var9);
      scePaf_4508F2FA (var9);
    }
    *((int *) 0x000490C8) = 0x00000000;
    var12 = sub_2C7D4 ();
    var2 = var12;
    if (var12 >= 0)
    {

    label15:
      var3 = *((int *) 0x0004905C);
      *((int *) 0x0004905C) = (var3 + 0xFFFFFFFF);
      ra = ((int *) sp)[3];
    }
    else
    {
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label15;
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x0002C9F8
 */
void sub_2C9F8 ()
{
  var1 = *((int *) 0x0004905C);
  return;
}

/**
 * Subroutine at address 0x0002CA08
 */
void sub_2CA08 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x00049060);
  var3 = var2 + 0x00000001;
  *((int *) 0x00049060) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_2C8B0 (var1);
    var4 = var9;
    if (!(var9 < 0))
    {
      var12 = scePaf_48BB05D5 (0x00000004);
      scePaf_79B2405B (var12, "flash0:/kd/np_service.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x000490CC) = var12;
      var17 = sceNpService_0F8F5821 (0x00020000, 0x00003C00, 0x00000028);
      var4 = var17;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002CAB8
 */
void sub_2CAB8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049060);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    sceNpService_00ACFAC3 ();
    var9 = *((int *) 0x000490CC);
    if (var9 != 0x00000000)
    {
      scePaf_7B15E9DC (var9);
      scePaf_4508F2FA (var9);
    }
    *((int *) 0x000490CC) = 0x00000000;
    var12 = sub_2C960 ();
    var2 = var12;
    if (var12 >= 0)
    {

    label15:
      var3 = *((int *) 0x00049060);
      *((int *) 0x00049060) = (var3 + 0xFFFFFFFF);
      ra = ((int *) sp)[3];
    }
    else
    {
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label15;
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002CB50
 */
void sub_2CB50 ()
{
  var1 = *((int *) 0x00049060);
  return;
}

/**
 * Subroutine at address 0x0002CB60
 */
int sub_2CB60 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = !((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004;
  var2 = *((int *) 0x00049064);
  var3 = var2 + 0x00000001;
  *((int *) 0x00049064) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var9, "flash0:/kd/np_commerce2.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x000490D0) = var9;
    var14 = scePaf_48BB05D5 (0x00000004);
    scePaf_79B2405B (var14, "flash0:/kd/np_commerce2_store.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x000490D4) = var14;
    var19 = sceNpCommerce2_0E9956E3 ();
    var4 = var19;
    if (!(var19 < 0))
    {
      var22 = sceNpCommerce2Store_370974DD ();
      var4 = var22;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0002CC3C
 */
int sub_2CC3C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00049064);
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (var1 == 0x00000001)
  {
    sceNpCommerce2Store_6D83DC19 ();
    sceNpCommerce2_A5A34EA4 ();
    var11 = *((int *) 0x000490D4);
    if (var11 != 0x00000000)
    {
      scePaf_7B15E9DC (var11);
      scePaf_4508F2FA (var11);
      var12 = *((int *) 0x000490D0);
    }
    else
    {
      var12 = *((int *) 0x000490D0);
    }
    *((int *) 0x000490D4) = 0x00000000;
    if (var12 != 0x00000000)
    {
      scePaf_7B15E9DC (var12);
      scePaf_4508F2FA (var12);
      *((int *) 0x000490D0) = 0x00000000;
    }
    else
    {
      *((int *) 0x000490D0) = 0x00000000;
    }
  }
  var2 = *((int *) 0x00049064);
  ra = ((int *) sp)[4];
  var3 = ((int *) sp)[3];
  *((int *) 0x00049064) = (var2 + 0xFFFFFFFF);
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return 0x00000000;
}

/**
 * Subroutine at address 0x0002CCFC
 */
void sub_2CCFC ()
{
  var1 = *((int *) 0x00049064);
  return;
}

/**
 * Subroutine at address 0x0002CD0C
 */
void sub_2CD0C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x00049068);
  var3 = var2 + 0x00000001;
  *((int *) 0x00049068) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_2CB60 (var1);
    var4 = var9;
    if (!(var9 < 0))
    {
      var12 = scePaf_48BB05D5 (0x00000004);
      scePaf_79B2405B (var12, "flash0:/kd/np_commerce2_regcam.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x000490D8) = var12;
      var17 = sceNpCommerce2RegCam_DBC420F0 ();
      var4 = var17;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002CDB0
 */
void sub_2CDB0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049068);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    sceNpCommerce2RegCam_2F5B9CE8 ();
    var9 = *((int *) 0x000490D8);
    if (var9 != 0x00000000)
    {
      scePaf_7B15E9DC (var9);
      scePaf_4508F2FA (var9);
    }
    *((int *) 0x000490D8) = 0x00000000;
    var12 = sub_2CC3C ();
    var2 = var12;
    if (var12 >= 0)
    {

    label15:
      var3 = *((int *) 0x00049068);
      *((int *) 0x00049068) = (var3 + 0xFFFFFFFF);
      ra = ((int *) sp)[3];
    }
    else
    {
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label15;
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002CE48
 */
void sub_2CE48 ()
{
  var1 = *((int *) 0x00049068);
  return;
}

/**
 * Subroutine at address 0x0002CE58
 */
int sub_2CE58 (int arg1)
{
  var1 = (arg1 << 0x00000001) + arg1;
  var2 = var1 - (((var1 + ((var1 >> 0x0000001F) >> 0x0000001E)) & 0xFFFFFFFC) | (0x00000000 & 0x00000003));
  var3 = 0x00000004 - var2;
  if (var2 <= 0)
  {
    var3 = 0x00000000;
  }
  else
  {
  }
  return var3;
}

/**
 * Subroutine at address 0x0002CE90
 */
int sub_2CE90 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[1] = arg2;
  ((int *) sp)[11] = s7;
  ((int *) sp)[10] = s6;
  ((int *) sp)[6] = s2;
  var1 = arg4;
  ((int *) sp)[5] = s1;
  var2 = arg3;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = fp;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = arg1;
  var5 = scePaf_D86C4533 (arg1, 0x0003B0CC);
  var6 = var5;
  var7 = 0xFFFFFFFF;
  if (!(var5 == 0x00000000))
  {
    var10 = sub_2CE58 (var2);
    var11 = var10;
    var12 = (var2 << 0x00000001) + var2;
    var13 = var12 + var11;
    ((int *) sp)[2] = var12;
    var14 = (var13 * var1);
    var15 = var14 + 0x00000036;
    var18 = scePaf_31AC0624 (0x00000040, var15);
    var19 = var18;
    if (var18 == 0x00000000)
    {

    label30:
      if (!(var6 == 0x00000000))
      {
        var38 = scePaf_FFD71622 (var6);
      }

    label33:
      var39 = ((int *) sp)[0];
      var42 = IoFileMgrForUser_F27A9C51 (var39);
      var7 = 0xFFFFFFFF;
      if (!(var19 == 0x00000000))
      {
        scePaf_22FB4177 (var19);
        var7 = 0xFFFFFFFF;
      }
    }
    else
    {
      ((char *) var19)[0] = 0x00000042;
      ((char *) var19)[1] = 0x0000004D;
      ((char *) var19)[3] = ((var15 >> 8) & 0x000000FF);
      ((char *) var19)[10] = 0x00000036;
      ((char *) var19)[14] = 0x00000028;
      var20 = var1 + 0xFFFFFFFF;
      ((char *) var19)[4] = ((var15 >> 16) & 0x000000FF);
      var21 = var19 + 0x00000036;
      ((char *) var19)[5] = (var15 >> 0x00000018);
      ((char *) var19)[19] = ((var2 >> 8) & 0x000000FF);
      ((char *) var19)[20] = ((var2 >> 16) & 0x000000FF);
      ((char *) var19)[21] = (var2 >> 0x00000018);
      ((char *) var19)[23] = ((var1 >> 8) & 0x000000FF);
      ((char *) var19)[24] = ((var1 >> 16) & 0x000000FF);
      ((char *) var19)[25] = (var1 >> 0x00000018);
      ((char *) var19)[26] = 0x00000001;
      ((char *) var19)[28] = 0x00000018;
      ((char *) var19)[2] = var15;
      ((char *) var19)[6] = 0x00000000;
      ((char *) var19)[7] = 0x00000000;
      ((char *) var19)[8] = 0x00000000;
      ((char *) var19)[9] = 0x00000000;
      ((char *) var19)[11] = 0x00000000;
      ((char *) var19)[12] = 0x00000000;
      ((char *) var19)[13] = 0x00000000;
      ((char *) var19)[15] = 0x00000000;
      ((char *) var19)[16] = 0x00000000;
      ((char *) var19)[17] = 0x00000000;
      ((char *) var19)[18] = var2;
      ((char *) var19)[22] = var1;
      ((char *) var19)[27] = 0x00000000;
      ((char *) var19)[29] = 0x00000000;
      ((char *) var19)[30] = 0x00000000;
      ((char *) var19)[31] = 0x00000000;
      ((char *) var19)[32] = 0x00000000;
      ((char *) var19)[33] = 0x00000000;
      ((char *) var19)[35] = ((var14 >> 8) & 0x000000FF);
      ((char *) var19)[36] = ((var14 >> 16) & 0x000000FF);
      ((char *) var19)[37] = (var14 >> 0x00000018);
      ((char *) var19)[34] = var14;
      ((char *) var19)[38] = 0x00000000;
      ((char *) var19)[39] = 0x00000000;
      ((char *) var19)[40] = 0x00000000;
      ((char *) var19)[41] = 0x00000000;
      ((char *) var19)[42] = 0x00000000;
      ((char *) var19)[43] = 0x00000000;
      ((char *) var19)[44] = 0x00000000;
      ((char *) var19)[45] = 0x00000000;
      ((char *) var19)[46] = 0x00000000;
      ((char *) var19)[47] = 0x00000000;
      ((char *) var19)[48] = 0x00000000;
      ((char *) var19)[49] = 0x00000000;
      ((char *) var19)[50] = 0x00000000;
      ((char *) var19)[51] = 0x00000000;
      ((char *) var19)[52] = 0x00000000;
      ((char *) var19)[53] = 0x00000000;
      if (!(var20 < 0))
      {
        var22 = ((int *) sp)[1];
        var23 = ((int *) sp)[2];
        var24 = (var20 * var22);
        while (1) {
          if (!(((0x00000000 < var2)) == 0x00000000))
          {
            var25 = (var24 << 0x00000002) + arg5;
            var26 = var21;
            var27 = var2;
            while (1) {
              var28 = ((unsigned char *) var25)[2];
              var27 = var27 + 0xFFFFFFFF;
              ((char *) var26)[0] = var28;
              var29 = ((unsigned char *) var25)[1];
              ((char *) var26)[1] = var29;
              var30 = ((unsigned char *) var25)[0];
              var25 = var25 + 0x00000004;
              ((char *) var26)[2] = var30;
              var26 = var26 + 0x00000003;
              if (var27 != 0x00000000)
                continue;
              break;
            }
          }
          if (((0x00000000 < var11)) == 0x00000000)
          {
            var20 = var20 + 0xFFFFFFFF;
          }
          else
          {
            var31 = var23 + var21;
            var32 = var11;
            while (1) {
              var32 = var32 + 0xFFFFFFFF;
              ((char *) var31)[0] = 0x00000000;
              var31 = var31 + 0x00000001;
              if (var32 != 0x00000000)
                continue;
              break;
            }
            var20 = var20 + 0xFFFFFFFF;
          }
          var21 = var21 + var13;
          var24 = var24 + (0x00000000 - var22);
          if (var20 >= 0)
            continue;
          break;
        }
      }
      var35 = scePaf_2A73D741 (var19, 0x00000001, var15, var6);
      if (!(var15 == var35))
        goto label30;
      scePaf_22FB4177 (var19);
      var58 = scePaf_FFD71622 (var6);
      var7 = 0x00000000;
      if (!(var58 == 0x00000000))
      {
        goto label33;
      }
    }
  }
  ra = ((int *) sp)[13];
  var45 = ((int *) sp)[12];
  var46 = ((int *) sp)[11];
  var47 = ((int *) sp)[10];
  var48 = ((int *) sp)[9];
  var49 = ((int *) sp)[8];
  var50 = ((int *) sp)[7];
  var51 = ((int *) sp)[6];
  var52 = ((int *) sp)[5];
  var53 = ((int *) sp)[4];
  sp = sp + 0x00000040;
  return var7;
}

/**
 * Subroutine at address 0x0002D178
 */
void sub_2D178 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = s0;
  var1 = ((int *) arg2)[11];
  var2 = ((int *) arg2)[12];
  ((int *) sp)[0] = var1;
  ((int *) sp)[1] = var2;
  ((int *) sp)[4] = var1;
  ((int *) sp)[5] = var2;
  var5 var6 = scePaf_0A6D0925 (arg2, 0x00000001);
  var7 = ((int *) sp)[0];
  var8 = ((int *) sp)[1];
  ((int *) sp)[9] = var6;
  ((int *) sp)[8] = var5;
  var11 = sub_2CE90 (arg1, var7, var7, var8, var5);
  ra = ((int *) sp)[13];
  var12 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0002D1DC
 */
void sub_2D1DC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var3 = scePaf_632F3E08 ();
  var4 = sp;
  sub_32408 (var4, var3);
  var7 = ((int *) sp)[0];
  var10 = scePaf_FCCB5B3C (var7, 0x00000000);
  var13 = scePaf_B117860A (var7, var10);
  var14 = ((int *) sp)[0];
  var15 = ((int *) var14)[15];
  var16 = ((short *) var14)[13];
  var17 = ((short *) var14)[12];
  var20 = sub_2CE90 (arg1, ((var15 + ((var15 >> 0x0000001F) >> 0x0000001E)) >> 0x00000002), var17, var16, var13);
  var21 = ((int *) sp)[0];
  var22 = var20;
  scePaf_60F871BB (var21);
  var25 = ((int *) sp)[0];
  if (!(var25 == 0x00000000))
  {
    var26 = ((int *) var25)[1];
    var27 = var26 + 0xFFFFFFFF;
    ((int *) var25)[1] = var27;
    if (var27 <= 0)
    {
      var30 = ((int *) var25)[0];
      var31 = ((int *) var30)[1];
      var34 var35 = (*var31) (var25);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[6];
  var28 = ((int *) sp)[5];
  var29 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002D2A4
 */
void vsh_10FB8F2C (int arg1, int arg2)
{
  var1 = arg1;
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[0] = 0x00045488;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) var1)[4] = 0x00000000;
  ((int *) var1)[5] = 0x00000000;
  ((int *) var1)[6] = 0x00000000;
  ((int *) var1)[7] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[4] = s0;
  var2 = arg1 + 0x00000020;
  ((int *) sp)[5] = s1;
  ((int *) sp)[6] = ra;
  var3 = sp;
  sub_3349C (var2);
  sub_33BF4 (var2, arg2);
  ra = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002D314
 */
void vsh_C78B2486 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) arg1)[1] = arg2;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_A78805B0 ("system_plugin");
  ((int *) var1)[2] = var4;
  if (var4 != 0x00000000)
  {
    var18 = scePaf_4E87FDFC (var4, 0x00000001);
    ((int *) var1)[4] = var18;
  }
  var7 = scePaf_A78805B0 ("topmenu_plugin");
  ((int *) var1)[3] = var7;
  if (var7 != 0x00000000)
  {
    var15 = scePaf_4E87FDFC (var7, 0x00000001);
    ((int *) var1)[5] = var15;
  }
  var8 = ((int *) var1)[1];
  ((int *) var1)[7] = 0x00000000;
  var9 = ((int *) var8)[22];
  ((int *) var1)[6] = var9;
  sub_33C28 ((var1 + 0x00000020));
  ra = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D3A8
 */
void vsh_16E58170 (int arg1)
{
  ((int *) arg1)[7] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[3] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x0002D3C8
 */
void vsh_95519452 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = ((int *) arg1)[1];
  scePaf_BFC95DA3 (var2);
  ((int *) var1)[7] = 0x00000000;
  sub_33C28 ((var1 + 0x00000020));
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D400
 */
void vsh_2010E7C1 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[4];
  var5 var6 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var7 = ((int *) arg1)[5];
  var8 = ((int *) var7)[0];
  var11 var12 = (*var8) (arg2);
  ra = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D44C
 */
void vsh_B55E98A5 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s2;
  var1 = arg1 + 0x00000020;
  ((int *) sp)[9] = s1;
  var2 = arg2;
  ((int *) sp)[8] = s0;
  var3 = arg1;
  var4 = sp;
  ((int *) sp)[11] = ra;
  var5 = ((int *) var1)[1];
  if (var5 == 0x00000000)
  {

  label6:
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    sub_318F0 (var4, arg2);
    var35 = sp;
    sub_33CB0 (var1, var35);
    var38 = sp;
    sub_317D8 (var38);
    var41 = ((int *) var3)[1];
  }
  else
  {
    var6 = ((int *) var3)[8];
    var7 = ((int *) (var6 + (((var5 << 0x00000001) + var5) << 0x00000002)))[1073741821];
    var10 = scePaf_E3D530AE (var7, arg2);
    var4 = sp;
    arg2 = var2;
    if (var10 != 0x00000000)
      goto label6;
    var11 = ((int *) var3)[1];
  }
  scePaf_27F4E35C (var11, var2, 0x00000000, 0x00000000);
  var14 = ((int *) var3)[1];
  var17 = scePaf_11FA6015 (var14, var2);
  var18 = var2;
  if (var17 == 0x00000000)
  {
    var25 = ((int *) var1)[1];
    var26 = ((int *) var3)[8];
    var27 = ((int *) (var26 + (((var25 << 0x00000001) + var25) << 0x00000002)))[1073741821];
    var30 = scePaf_E3D530AE (var27, var18);
    if (var30 != 0x00000000)
    {

    label27:
      ra = ((int *) sp)[11];
    }
    else
    {
      sub_33D44 (var1);
      ra = ((int *) sp)[11];
    }
  }
  else
  {
    ((int *) var3)[7] = var17;
    var19 = ((int *) var3)[1];
    scePaf_3C8DD7F0 (var19, var18);
    goto label27;
  }
  var22 = ((int *) sp)[10];
  var23 = ((int *) sp)[9];
  var24 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002D558
 */
void vsh_F22A8C85 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg1 + 0x00000020;
  ((int *) sp)[2] = ra;
  var3 = ((int *) var2)[1];
  var4 = ((var3 << 0x00000001) + var3) << 0x00000002;
  if (((var3 < 0x00000002)) == 0x00000000)
  {
    var13 = ((int *) arg1)[8];
    var14 = ((int *) arg1)[1];
    var15 = ((int *) (var13 + var4))[1073741821];
    scePaf_E305A594 (var14, var15);
    sub_33D44 (var2);
    var20 = ((int *) var2)[1];
    var21 = ((int *) var1)[8];
    var22 = ((int *) var1)[1];
    var23 = ((int *) (var21 + (((var20 << 0x00000001) + var20) << 0x00000002)))[1073741821];
    var26 = scePaf_11FA6015 (var22, var23);
    if (var26 == 0x00000000)
    {
      ((int *) var1)[7] = 0x00000000;

    label16:
      ra = ((int *) sp)[2];
    }
    else
    {
      ((int *) var1)[7] = var26;
      var27 = ((int *) var1)[1];
      scePaf_3C8DD7F0 (var27, var23);
      ra = ((int *) sp)[2];
    }
  }
  else
  {
    var5 = ((int *) arg1)[0];
    var6 = ((int *) var5)[5];
    var9 var10 = (*var6) (arg1, 0x00000002, var4, arg4, arg5, arg6, arg7, arg8);
    goto label16;
  }
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D61C
 */
void sub_2D61C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  *((int *) 0x000490DC) = arg1;
  if ((arg1 & 0x00000001) != 0x00000000)
  {
    var14 = sub_2D750 (arg1, arg3, arg4);
    var3 = var14;
    if (var14 >= 0)
    {

    label7:
      var1 = *((int *) 0x000490DC);
      if ((var1 & 0x00000002) != 0x00000000)
      {
        var11 = sub_2D970 (var1, arg2);
        var3 = var11;
        if (var11 >= 0)
        {

        label12:
          var2 = *((int *) 0x000490DC);
          if ((var2 & 0x00000004) != 0x00000000)
          {
            var8 = sub_2E180 (var2);
            var3 = var8;
            if (var8 >= 0)
            {

            label17:
              var3 = 0x00000000;
              ra = ((int *) sp)[2];
            }
            else
            {
              ra = ((int *) sp)[2];
            }
          }
          else
          goto label17;
        }
        else
        {
          ra = ((int *) sp)[2];
        }
      }
      else
      goto label12;
    }
    else
    {
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label7;
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D6D8
 */
void sub_2D6D8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x000490DC);
  ((int *) sp)[1] = ra;
  if ((var1 & 0x00000001) != 0x00000000)
  {
    sub_2D7F4 ();
    var1 = *((int *) 0x000490DC);
  }
  if ((var1 & 0x00000002) != 0x00000000)
  {
    sub_2DA14 ();
    var1 = *((int *) 0x000490DC);
  }
  if ((var1 & 0x00000004) != 0x00000000)
  {
    sub_2E254 ();
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D750
 */
int sub_2D750 (int arg1, int arg2, int arg3)
{
  *((int *) 0x000490E0) = arg1;
  sp = sp + 0xFFFFFFE0;
  *((int *) 0x000490F8) = arg2;
  *((int *) 0x000490FC) = arg3;
  *((int *) 0x000490F0) = 0x00000000;
  ((int *) sp)[4] = ra;
  *((int *) 0x000490F4) = 0x00000000;
  var3 = ThreadManForUser_E81CAF8F ("SceVshMediaDetectMS", 0x0002D8C4, 0x00000000);
  var4 = var3;
  *((int *) 0x000490EC) = var4;
  var5 = sp;
  var6 = var4;
  if (!(var4 < 0))
  {
    ((int *) sp)[0] = var4;
    var9 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02415821, var5, 0x00000004, 0x00000000, 0x00000000);
    var6 = MIN (var9, 0x00000000);
  }
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x0002D7F4
 */
void sub_2D7F4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x000490EC);
  var2 = sp;
  ((int *) sp)[5] = ra;
  ((int *) sp)[0] = var1;
  var5 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02415822, var2, 0x00000004, 0x00000000, 0x00000000);
  var6 = *((int *) 0x000490EC);
  ThreadManForUser_EDBA5844 (var6);
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002D84C
 */
void sub_2D84C ()
{
  var1 = *((int *) 0x000490F0);
  return;
}

/**
 * Subroutine at address 0x0002D858
 */
void sub_2D858 ()
{
  var1 = *((int *) 0x000490F4);
  return;
}

/**
 * Subroutine at address 0x0002D864
 */
void sub_2D864 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x000490F0);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (!(var2 == var1))
  {
    scePaf_6D516E8A (0x00000409, arg1, var1);
    var5 = *((int *) 0x000490F4);
    *((int *) 0x000490F0) = var2;
    *((int *) 0x000490F4) = (var5 + 0x00000001);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D8C4
 */
void sub_2D8C4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg2 == 0x00000001)
  {
    var11 = *((int *) 0x000490F8);
    if (var11 != 0x00000000)
    {
      var17 var18 = (*var11) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
      var12 = (var1 < 0x00000002);
    }
    else
    {
      var12 = (var1 < 0x00000002);
    }
    if (var12 == 0x00000000)
    {
      sub_2D864 (0x00000000);
      var2 = 0x00000002;
    }
    else
    {
      var2 = 0x00000002;
    }
  }
  else
  {
    var2 = 0x00000003;
    if (arg2 == 0x00000002)
    {
      var6 = *((int *) 0x000490FC);
      if (var6 != 0x00000000)
      {
        var9 var10 = (*var6) (0x00000003, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        var2 = 0x00000000;
      }
      else
      {
        var2 = 0x00000000;
      }
    }
  }
  sub_2D864 (var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D970
 */
int sub_2D970 (int arg1, int arg2)
{
  *((int *) 0x000490E4) = arg1;
  sp = sp + 0xFFFFFFF0;
  *((int *) 0x0004910C) = arg2;
  *((int *) 0x00049110) = 0x00000000;
  *((int *) 0x00049104) = 0x00000000;
  ((int *) sp)[0] = ra;
  *((int *) 0x00049108) = 0x00000000;
  var3 = ThreadManForUser_E81CAF8F ("SceVshMediaDetectUMD", 0x0002DC2C, 0x00000000);
  *((int *) 0x00049100) = var3;
  var4 = var3;
  if (!(var3 < 0))
  {
    var7 = sceUmdUser_AEE7404D (var3);
    var4 = var7;
    if (!(var7 < 0))
    {
      var10 = sceUmdUser_C6183D47 (0x00000001, "disc0:");
      var4 = MIN (var10, 0x00000000);
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0002DA14
 */
void sub_2DA14 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049100);
  ((int *) sp)[1] = ra;
  sceUmdUser_BD2BDE07 (var1);
  var4 = *((int *) 0x00049100);
  ThreadManForUser_EDBA5844 (var4);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DA4C
 */
int sub_2DA4C ()
{
  var1 = *((int *) 0x00049104);
  return var1;
}

/**
 * Subroutine at address 0x0002DA58
 */
int sub_2DA58 ()
{
  var1 = *((int *) 0x00049108);
  return var1;
}

/**
 * Subroutine at address 0x0002DA64
 */
void sub_2DA64 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00049104);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  if (!(var2 == var1))
  {
    scePaf_6D516E8A (0x00000408, arg1, var1);
    var5 = *((int *) 0x00049108);
    *((int *) 0x00049104) = var2;
    *((int *) 0x00049108) = (var5 + 0x00000001);
  }
  var6 = *((int *) 0x0004910C);
  ra = ((int *) sp)[3];
  if (!(var6 == 0x00000000))
  {
    var7 = *((int *) 0x00049104);
    if (!(var7 == 0x00000001))
    {
      var10 var11 = (*var6) (var7, var6);
      *((int *) 0x0004910C) = 0x00000000;
      ra = ((int *) sp)[3];
    }
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DAF8
 */
void sub_2DAF8 ()
{
  return;
}

/**
 * Subroutine at address 0x0002DB00
 */
void sub_2DB00 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (((arg2 < 0x00000002)) == 0x00000000)
  {
    sub_2DA64 (0x00000000);
  }
  sub_2DA64 (0x00000001);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DB38
 */
void sub_2DB38 ()
{
  return;
}

/**
 * Subroutine at address 0x0002DB40
 */
void sub_2DB40 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2DA64 (0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DB5C
 */
void sub_2DB5C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2DD10 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DB78
 */
void sub_2DB78 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg4;
  ((int *) sp)[1] = ra;
  if (((arg2 < 0x00000003)) == 0x00000000)
  {
    sub_2DA64 (0x00000000);
  }
  else
  {
  }
  var2 = 0x00000000;
  if (!(var1 == 0x80020321))
  {
    var2 = 0x00000002;
    if (!(var1 < 0))
    {
      var2 = var1;
    }
  }
  sub_2DA64 (var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DBD8
 */
void sub_2DBD8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2DD10 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DBF4
 */
void sub_2DBF4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  if (!(arg4 == 0x80020321))
  {
    var1 = 0x00000002;
    if (!(arg4 < 0))
    {
      var1 = arg4;
    }
  }
  sub_2DA64 (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DC2C
 */
void sub_2DC2C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  if ((arg2 & 0x00000020) != 0x00000000)
  {

  label7:

  label17:
    var13 = scePaf_AB9A6186 (0x00000001, 0x0002DBD8, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0002DBF4);
    ra = ((int *) sp)[1];
  }
  else
  {
    if ((arg2 & 0x00000002) != 0x00000000)
    {
      goto label7;
    }
    else
    {
      if ((arg2 & 0x00000001) != 0x00000000)
      {

      label16:
        goto label17;
      }
      else
      {
        if ((arg2 & 0x00000008) != 0x00000000)
        {
          var10 = sceUmdUser_46EBB729 ();
          if (var10 <= 0)
          {

          label20:
            var1 = *((int *) 0x0004910C);
            if (var1 != 0x00000000)
            {
              var3 = *((int *) 0x00049104);
              var6 var7 = (*var1) (var3, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
              *((int *) 0x0004910C) = 0x00000000;
            }
            ra = ((int *) sp)[1];
          }
          else
          {
            goto label16;
          }
        }
        else
        goto label20;
      }
    }
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002DD10
 */
void sub_2DD10 ()
{
  sp = sp + 0xFFFFFF20;
  var1 = sp;
  ((int *) sp)[52] = ra;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  ((int *) sp)[49] = s1;
  ((int *) sp)[48] = s0;
  var4 = IoFileMgrForUser_54F5FB11 ("umd0:", 0x01F20001, 0x00000000, 0x00000000, var1, 0x00000008);
  var5 = var4;
  if (var4 < 0)
  {

  label75:
    ra = ((int *) sp)[52];
  }
  else
  {
    var6 = ((int *) sp)[1];
    var5 = 0x00000002;
    if ((var6 & 0x00007070) == 0x00000000)
      goto label75;
    var7 = *((int *) 0x00049110);
    ((int *) sp)[44] = 0x00000000;
    if (var7 != 0x00000000)
    {
      var62 = sp + 0x000000B0;
      var65 var66 = (*var7) (var6, var62);
      var8 = ((int *) sp)[44];
    }
    else
    {
      var8 = ((int *) sp)[44];
    }
    var5 = 0x00000008;
    if (var8 == 0x00000000)
      goto label75;
    var9 = var6 & 0x00000070;
    var10 = ((var6 & 0x00001000)) ? (var9 | 0x00000010) : var9;
    var11 = ((var6 & 0x00002000)) ? (var10 | 0x00000040) : var10;
    var14 = IoFileMgrForUser_109F50BC ("disc0:/UMD_DATA.BIN", 0x00000001, 0x00000000);
    var5 = var14;
    if (var14 < 0)
      goto label75;
    var15 = sp + 0x00000010;
    ((int *) sp)[16] = 0x0000DEFC;
    ((int *) sp)[17] = var14;
    var18 = IoFileMgrForUser_6A638D83 (var14, var15, 0x00000030);
    var19 = var18;
    if (var18 < 0)
    {
      var56 = ((int *) sp)[16];
      if (var56 == 0x00000000)
      {
        var5 = var19;
      }
      else
      {
        var57 = ((int *) sp)[17];
        var60 var61 = (*var56) (var57);
        var5 = var19;
      }
      goto label75;
    }
    else
    {
      if (((var18 < 0x00000030)) != 0x00000000)
      {
        var50 = ((int *) sp)[16];
        if (var50 != 0x00000000)
        {
          var51 = ((int *) sp)[17];
          var54 var55 = (*var50) (var51);
          var5 = 0x00000002;
        }
        else
        {
          var5 = 0x00000002;
        }
        goto label75;
      }
      else
      {
        var20 = ((int *) sp)[16];
        if (var20 != 0x00000000)
        {
          var45 = ((int *) sp)[17];
          var48 var49 = (*var20) (var45);
          var21 = ((int *) sp)[44];
        }
        else
        {
          var21 = ((int *) sp)[44];
        }
        var22 = 0x00000000;
        var23 = 0x00000000;
        var24 = 0x00000021;
        var25 = var15 + 0x00000021;
        while (1) {
          var26 = ((char *) var25)[0];
          if (var26 == 0x00000047)
          {
            var23 = var23 | 0x00000010;
            if (!(var22 != 0x00000000))
            {
              var22 = !((var21 & 0x00001010)) ? 0x00000000 : 0x00000047;
            }

          label47:
            var24 = var24 + 0x00000001;
          }
          else
          {
            if (((var26 < 0x00000048)) == 0x00000000)
            {
              if (var26 != 0x00000056)
              {
                var24 = var24 + 0x00000001;
              }
              else
              {
                var23 = var23 | 0x00000020;
                if (!(var22 != 0x00000000))
                {
                  var22 = !((var21 & 0x00004020)) ? 0x00000000 : 0x00000056;
                }
                goto label47;
              }
            }
            else
            {
              if (var26 == 0x00000041)
              {
                var23 = var23 | 0x00000040;
                if (!(var22 != 0x00000000))
                {
                  var22 = !((var21 & 0x00002040)) ? 0x00000000 : 0x00000041;
                }
              }
              goto label47;
            }
          }
          if (!(((var24 < 0x0000002F)) != 0x00000000))
            break;
          var25 = var15 + var24;
          continue;
        }
        var5 = 0x00000002;
        if ((((var6 & 0x00004000)) ? (var11 | 0x00000020) : var11) != var23)
          goto label75;
        var27 = ((int *) sp)[44];
        var28 = !((var27 & 0x00001010)) ? 0x00000000 : 0x00000010;
        var29 = ((var27 & 0x00002040)) ? (var28 | 0x00000020) : var28;
        var30 = ((var27 & 0x00004020)) ? (var29 | 0x00000040) : var29;
        if (var22 == 0x00000047)
        {
          var30 = var30 | 0x00000100;

        label60:
          var31 = sp + 0x00000050;
        }
        else
        {
          if (((var22 < 0x00000048)) == 0x00000000)
          {
            if (var22 == 0x00000056)
            {
              var30 = var30 | 0x00000400;
              goto label60;
            }
            else
            {
              var31 = sp + 0x00000050;
            }
          }
          else
          {
            if (var22 == 0x00000041)
            {
              var30 = var30 | 0x00000200;
            }
            goto label60;
          }
        }
        var34 = IoFileMgrForUser_ACE946E8 ("disc0:/PSP_GAME/SYSDIR/UPDATE/PARAM.SFO", var31);
        var35 = var34;
        if (var34 != 0x00000000)
        {
          var36 = 0x00000000;
          if (var35 == 0x80010002)
          {

          label67:
            if ((var30 & 0x00000010) != 0x00000000)
            {
              var43 = IoFileMgrForUser_ACE946E8 ("disc0:/PSP_GAME/PARAM.SFO", var31);
              var44 = var43;
              if (var43 == 0x00000000)
              {

              label74:
                var5 = var30;
                goto label75;
              }
              else
              {
                var5 = var44;
                if (var44 != 0x80010002)
                  goto label75;
                var30 = (((var30 & 0xFFFFFFEF) | (0x00000000 & 0x00000001)) & 0xFFFFFEFF) | (0x00000000 & 0x00000001);
                var5 = 0x00000004;
                if (var36 != 0x00000000)
                  goto label74;
                ra = ((int *) sp)[52];
              }
            }
            else
            goto label74;
          }
          else
          {
            var5 = var35;
            goto label75;
          }
        }
        else
        {
          var36 = 0x00000001;
          var30 = var30 | 0x00000080;
          goto label67;
        }
      }
    }
  }
  var37 = ((int *) sp)[51];
  var38 = ((int *) sp)[50];
  var39 = ((int *) sp)[49];
  var40 = ((int *) sp)[48];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x0002E014
 */
void sub_2E014 (int arg1)
{
  *((int *) 0x00049110) = arg1;
  return;
}

/**
 * Subroutine at address 0x0002E020
 */
int sub_2E020 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = s0;
  var3 = IoFileMgrForUser_109F50BC ("disc0:/PSP_GAME/PARAM.SFO", 0x00000001, 0x00000000);
  if (!(var3 < 0))
  {
    var4 = sp + 0x00000020;
    ((int *) sp)[0] = 0x0000DEFC;
    ((int *) sp)[1] = var3;
    var7 = sceVshCommonUtil_922DB51D (var3, var4);
    var8 = var7;
    if (var7 == 0x00000000)
    {
      var16 = ((int *) sp)[8];
      var17 = sp + 0x00000024;
      ((int *) sp)[4] = 0x0000DF34;
      ((int *) sp)[5] = var16;
      var20 = sceVshCommonUtil_6BC2A336 (var16, "AB_FLAG", var17);
      var8 = var20;
      if (var20 == 0x00000000)
      {
        var27 = ((int *) sp)[8];
        var28 = ((int *) sp)[9];
        var29 = sp + 0x00000028;
        var30 = sp + 0x0000002C;
        var31 = sp + 0x00000030;
        var34 = sceVshCommonUtil_3A1EA724 (var27, var28, var29, var30, var31);
        var8 = var34;
        if (var34 != 0x00000000)
        {

        label31:
          var21 = ((int *) sp)[4];

        label32:
          if (var21 == 0x00000000)
          {
            var9 = ((int *) sp)[0];
          }
          else
          {
            var22 = ((int *) sp)[5];
            var25 var26 = (*var21) (var22);
            var9 = ((int *) sp)[0];
          }

        label38:
          if (var9 != 0x00000000)
          {
            var11 = ((int *) sp)[1];
            var14 var15 = (*var9) (var11);
            var3 = var8;
          }
          else
          {
            var3 = var8;
          }
        }
        else
        {
          var35 = ((int *) sp)[11];
          if (var35 != 0x00000004)
          {
            var55 = ((int *) sp)[12];

          label21:
            var38 = ((int *) sp)[4];
            if (var38 != 0x00000000)
            {
              var45 = ((int *) sp)[5];
              var48 var49 = (*var38) (var45);
              var39 = ((int *) sp)[0];
            }
            else
            {
              var39 = ((int *) sp)[0];
            }
            if (var39 != 0x00000000)
            {
              var40 = ((int *) sp)[1];
              var43 var44 = (*var39) (var40);
              var3 = 0xFFFFFFFF;
            }
            else
            {
              var3 = 0xFFFFFFFF;
            }
          }
          else
          {
            var36 = ((int *) sp)[12];
            var37 = ((int *) sp)[8];
            if (!(var36 == var35))
              goto label21;
            var50 = ((int *) sp)[9];
            var51 = sp + 0x00000034;
            var54 = sceVshCommonUtil_652E90E0 (var37, var50, var51);
            var8 = var54;
            if (var54 != 0x00000000)
              goto label31;
            var21 = ((int *) sp)[4];
            var8 = ((int *) sp)[13];
            goto label32;
          }
        }
      }
      else
      goto label31;
    }
    else
    {
      var9 = ((int *) sp)[0];
      goto label38;
    }
  }
  ra = ((int *) sp)[17];
  var10 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return var3;
}

/**
 * Subroutine at address 0x0002E180
 */
int sub_2E180 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  *((int *) 0x000490E8) = arg1;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  *((int *) 0x00049118) = 0x00000000;
  *((int *) 0x0004911C) = 0x00000000;
  var3 = sceUsb_AE5DE6AF (0x0003B194, 0x00000000, 0x00000000);
  if (!(var3 < 0))
  {
    var6 = ThreadManForUser_E81CAF8F ("SceVshMediaDetectUSB", 0x0002E318, 0x00000000);
    var7 = var6;
    if (var6 < 0)
    {

    label15:
      sceUsb_C2464FA0 (0x0003B194, 0x00000000, 0x00000000);
      var3 = var7;
    }
    else
    {
      *((int *) 0x00049114) = var6;
      var10 = sceUsb_8BFC3DE8 (var6, 0x00000000, 0x00000000);
      var7 = var10;
      var3 = 0x00000000;
      if (var7 < 0)
      {
        var14 = *((int *) 0x00049114);
        ThreadManForUser_EDBA5844 (var14);
        goto label15;
      }
    }
  }
  ra = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x0002E254
 */
void sub_2E254 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049114);
  ((int *) sp)[1] = ra;
  sceUsb_89DE0DC5 (var1);
  var4 = *((int *) 0x00049114);
  ThreadManForUser_EDBA5844 (var4);
  sceUsb_C2464FA0 ("USBBusDriver", 0x00000000, 0x00000000);
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E2A0
 */
void sub_2E2A0 ()
{
  var1 = *((int *) 0x00049118);
  return;
}

/**
 * Subroutine at address 0x0002E2AC
 */
void sub_2E2AC ()
{
  var1 = *((int *) 0x0004911C);
  return;
}

/**
 * Subroutine at address 0x0002E2B8
 */
void sub_2E2B8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00049118);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (!(var2 == var1))
  {
    scePaf_6D516E8A (0x0000040A, arg1, var1);
    var5 = *((int *) 0x0004911C);
    *((int *) 0x00049118) = var2;
    *((int *) 0x0004911C) = (var5 + 0x00000001);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E318
 */
void sub_2E318 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  if ((arg2 & 0x000000F0) == 0x00000020)
  {
    var1 = 0x00000002;
    if (!((arg2 & 0x0000000F) == 0x00000002))
    {
      var1 = 0x00000001;
    }
  }
  sub_2E2B8 (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E360
 */
void sub_2E360 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sceVshBridge_2EB0812A ();
  if (!(var3 == 0x00000000))
  {
    *((int *) 0x00047014) = 0x0000004A;
    *((int *) 0x00047018) = 0x00000025;
    *((int *) 0x0004701C) = 0x00000025;
    *((int *) 0x00047020) = 0x0000005F;
    *((int *) 0x00047024) = 0x0000002F;
    *((int *) 0x00047028) = 0x0000002F;
  }
  var4 = *((int *) 0x00049120);
  if (var4 <= 0)
  {
    var9 = ThreadManForUser_D6DA4BA1 ("vshpowersave", 0x00000100, 0x00000001, 0x00000001, 0x00000000);
    *((int *) 0x00049120) = var9;
    var10 = *((int *) 0x00049120);
    if (var10 < 0)
    {
      var17 = *((int *) 0x00049120);
      *((int *) 0x00049120) = 0x00000000;
      ra = ((int *) sp)[1];
    }
    else
    {
      var11 = *((int *) 0x0004702C);
      var12 = *((int *) 0x00047030);
      var13 = *((int *) 0x00047034);
      var16 = scePower_EBD177D6 (var11, var12, var13);

    label15:
      ra = ((int *) sp)[1];
    }
  }
  else
  {
    var5 = *((int *) 0x00049120);
    goto label15;
  }
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E43C
 */
void sub_2E43C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00049120);
  ((int *) sp)[1] = ra;
  var4 = ThreadManForUser_28B6489C (var1);
  var5 = var4;
  if (!(var4 < 0))
  {
    *((int *) 0x00049120) = 0x00000000;
    var5 = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E47C
 */
void sub_2E47C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  var2 = 0x800001FF;
  if (((arg1 < 0x00000020)) != 0x00000000)
  {
    var6 = *((int *) 0x00049120);
    var9 = ThreadManForUser_4E3A1105 (var6, 0x00000001, 0x00000000);
    var2 = var9;
    if (!(var9 < 0))
    {
      if ((arg2 & 0x000000FF) == 0x00000000)
      {
        var18 = *((int *) 0x00047038);
        var11 = var18 & (!(0x00000001 << var1));
      }
      else
      {
        var10 = *((int *) 0x00047038);
        var11 = var10 | (0x00000001 << var1);
      }
      *((int *) 0x00047038) = var11;
      sub_2E53C ();
      var14 = *((int *) 0x00049120);
      var17 = ThreadManForUser_3F53E640 (var14, 0x00000001);
      var2 = MIN (var17, 0x00000000);
    }
  }
  ra = ((int *) sp)[3];
  var3 = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E53C
 */
void sub_2E53C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00047038);
  ((int *) sp)[3] = s3;
  var2 = 0x0000006F;
  ((int *) sp)[2] = s2;
  var3 = 0x000000DE;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000000)
  {

  label8:
    var5 = *((int *) 0x00047014);
    var3 = *((int *) 0x00047018);
    var2 = *((int *) 0x0004701C);
  }
  else
  {
    var4 = *((int *) 0x00047038);
    var5 = 0x000000DE;
    if (((var4 & 0xF0000000) | (0x00000000 & 0x0FFFFFFF)) != 0x00000000)
    {

    label10:
    }
    else
    {
      var6 = *((int *) 0x00047038);
      if (!(((var6 & 0x000FFFFF) | (0x00000000 & 0x00000FFF)) != 0x00000000))
      {
        var7 = *((int *) 0x00047038);
        if ((var7 & 0x00100000) == 0x00000000)
        {
          goto label8;
        }
        else
        {
          var5 = *((int *) 0x00047020);
          var3 = *((int *) 0x00047024);
          var2 = *((int *) 0x00047028);
          goto label10;
        }
      }
    }
  }
  var8 = *((int *) 0x0004702C);
  var9 = 0x00000000;
  if (var8 == var5)
  {
    var37 = *((int *) 0x00047030);
    if (var37 != var3)
    {

    label18:
      var12 = scePower_EBD177D6 (var5, var3, var2);
      var9 = var12;
      if (!(var12 != 0x00000000))
      {
        *((int *) 0x0004702C) = var5;
        *((int *) 0x00047030) = var3;
        *((int *) 0x00047034) = var2;
      }
    }
    else
    {
      var38 = *((int *) 0x00047034);
      if (var38 != var2)
      {
        goto label18;
      }
      else
      {
      }
    }
  }
  else
  {
    goto label18;
  }
  var13 = *((int *) 0x00047038);
  ra = ((int *) sp)[5];
  var14 = *((int *) 0x00047038);
  var15 = ((int *) sp)[4];
  var16 = *((int *) 0x00047038);
  var17 = ((int *) sp)[3];
  var18 = *((int *) 0x00047038);
  var19 = ((int *) sp)[2];
  var20 = *((int *) 0x00047038);
  var21 = ((int *) sp)[1];
  var22 = *((int *) 0x00047038);
  var23 = *((int *) 0x00047038);
  var24 = *((int *) 0x00047038);
  var25 = *((int *) 0x00047038);
  var26 = *((int *) 0x00047038);
  var27 = *((int *) 0x00047038);
  var28 = *((int *) 0x00047038);
  var29 = *((int *) 0x00047038);
  var30 = *((int *) 0x00047038);
  var31 = *((int *) 0x00047038);
  var32 = *((int *) 0x00047038);
  var33 = *((int *) 0x00047038);
  var34 = *((int *) 0x00047038);
  var35 = *((int *) 0x00047038);
  var36 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002E6AC
 */
void vsh_D8EBD194 ()
{
  sp = sp + 0xFFFFFEE0;
  ((int *) sp)[69] = ra;
  ((int *) sp)[68] = s4;
  ((int *) sp)[67] = s3;
  ((int *) sp)[66] = s2;
  ((int *) sp)[65] = s1;
  ((int *) sp)[64] = s0;
  var1 = *((unsigned char *) 0x00049124);
  var2 = 0x00000000;
  if (var1 != 0x00000000)
  {
    *((int *) 0x000471C4) = 0x00000000;
    var10 = sceVshBridge_CE32CBEF ();
    var2 = 0xFFFFFFFF;
    if (!(var10 != 0x00000000))
    {
      var11 = sp + 0x000000F0;
      var14 = sceVshBridge_6CAEB765 (var11);
      var15 = var14;
      var16 = 0xFFFFFFFF;
      if (var14 < 0)
      {
        if (var15 == 0x80508007)
        {
          var71 = 0x00000002;

        label15:
          *((int *) 0x000471C4) = var71;
        }
        else
        {
          if (var15 == 0x80508008)
          {
            *((int *) 0x000471C4) = 0x00000000;
          }
          else
          {
            var71 = 0x00000003;
            goto label15;
          }
        }

      label74:
        var2 = var16;
      }
      else
      {
        var17 = ((int *) sp)[60];
        *((int *) 0x000471C4) = 0x00000001;
        var18 = !(((var15 >> 2) & 0x00000001)) ? 0x00000001 : 0x00000002;
        var19 = 0x00000000;
        ((int *) sp)[0] = 0x00000000;
        ((int *) sp)[1] = 0x00000000;
        if ((((0x00000000 < var17)) & ((0x00000000 < (!var17)))) != 0x00000000)
        {
          var51 = scePaf_31AC0624 (0x00000008, 0x00004000);
          var19 = var51;
          if (var51 == 0x00000000)
          {

          label44:
          }
          else
          {
            scePaf_6439FDBC (var51, 0x00000000, 0x00004000);
            if (var18 == 0x00000001)
            {
              var54 = sp + 0x00000070;
            }
            else
            {
              var54 = sp + 0x00000070;
            }
            var55 = ((int *) sp)[60];
            scePaf_11EFC5FD (var54, "%s/OMGAUDIO/%08X.DAT", "ms0:", var55);
            var58 = sp + 0x00000010;
            var61 = IoFileMgrForUser_ACE946E8 (var54, var58);
            if (var61 != 0x00000000)
            {
            }
            else
            {
              var62 = ((int *) sp)[6];
              if (((var62 < 0x00004001)) == 0x00000000)
              {
              }
              else
              {
                var65 = IoFileMgrForUser_109F50BC (var54, 0x00000001, 0x00000000);
                if (var65 < 0)
                  goto label44;
                var68 = IoFileMgrForUser_6A638D83 (var65, var19, 0x00004000);
                if (!(var68 < 0))
                {
                  if (!(((var68 < 0x00000021)) != 0x00000000))
                  {
                    ((int *) sp)[0] = (var19 + 0x00000020);
                    ((int *) sp)[1] = (var68 + 0xFFFFFFE0);
                  }
                }
                IoFileMgrForUser_810C4BC3 (var65);
              }
            }
          }
        }
        else
        goto label44;
        if (var18 == 0x00000001)
        {
          var44 = ((int *) sp)[1];
          var45 = (var44) ? sp : 0x00000000;
          var48 = sceVshBridge_53BFD101 (var45);
          if (var48 == 0x00000000)
          {
            var16 = 0x00000000;
          }
          else
          {
          }
        }
        else
        {
          var20 = ((int *) sp)[1];
          var23 = scePaf_31AC0624 (0x00000008, 0x00008000);
          var24 = var23;
          if (!(var23 == 0x00000000))
          {
            scePaf_6439FDBC (var23, 0x00000000, 0x00008000);
            var27 = 0x00000000;
            var16 = 0x00000000;
            var28 = 0x00000000;
            while (1) {
              var29 = sp;
              var32 = sub_2E998 (var28, var29, 0x00000000, var24);
              var33 = sp;
              var27 = var27 + 0x00000001;
              if (var32 < 0)
              {
                var43 = sub_2E998 (var27, var33, 0x00000001, var24);
                var16 = ((((var32 < 0xFFFFFFFF)) & (((!var43) < 0x00000001)))) ? 0xFFFFFFFF : ((((var43 < 0xFFFFFFFF))) ? 0xFFFFFFFF : var16);
              }
              var28 = var27;
              if (((var27 < 0x00000010)) != 0x00000000)
                continue;
              break;
            }
            scePaf_22FB4177 (var24);
          }
          var38 = sub_2EBA4 ();
          var16 = (var38) ? 0xFFFFFFFF : var16;
        }
        if (var19 == 0x00000000)
        {
          var2 = var16;
        }
        else
        {
          scePaf_22FB4177 (var19);
          goto label74;
        }
      }
    }
  }
  ra = ((int *) sp)[69];
  var3 = ((int *) sp)[68];
  var4 = ((int *) sp)[67];
  var5 = ((int *) sp)[66];
  var6 = ((int *) sp)[65];
  var7 = ((int *) sp)[64];
  sp = sp + 0x00000120;
  return;
}

/**
 * Subroutine at address 0x0002E94C
 */
void vsh_8D0E18A2 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x00049124);
  if (var1 != 0x00000000)
  {
    sceVshBridge_E5DA5E95 ();
    *((int *) 0x000471C4) = 0x00000000;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E988
 */
void vsh_C71F1AAC (int arg1)
{
  var1 = *((unsigned char *) 0x00049124);
  *((char *) 0x00049124) = arg1;
  return;
}

/**
 * Subroutine at address 0x0002E998
 */
int sub_2E998 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF00;
  ((int *) sp)[59] = s3;
  var1 = sp + 0x00000040;
  ((int *) sp)[61] = s5;
  ((int *) sp)[58] = s2;
  var2 = arg1;
  ((int *) sp)[56] = s0;
  var3 = arg3;
  ((int *) sp)[60] = s4;
  var4 = arg4;
  ((int *) sp)[57] = s1;
  var5 = 0x00000000;
  ((int *) sp)[63] = ra;
  ((int *) sp)[62] = s6;
  scePaf_3762CCEE (var1, 0x00000000, 0x00000040);
  if (var3 == 0x00000001)
  {
    scePaf_11EFC5FD (var1, "%s/OMGAUDIO/MACLIST%01X.BAK", "ms0:", var2);

  label13:
    var56 = sp;
    scePaf_11EFC5FD (var56, "%s/OMGAUDIO/MACLIST%01X.DAT", "ms0:", var2);
    var8 = var3 ^ 0x00000003;
  }
  else
  {
    if (((var3 < 0x00000002)) != 0x00000000)
    {
      if (var3 != 0x00000000)
      {

      label26:
        var5 = 0xFFFFFFFF;

      label27:
        var8 = var3 ^ 0x00000003;
      }
      else
      {
        goto label13;
      }
    }
    else
    {
      if (var3 == 0x00000002)
      {

      label23:
        var53 = sp;
        scePaf_11EFC5FD (var53, "%s/OMGAUDIO/SRCIDLST.DAT", "ms0:");
        var2 = 0xFFFFFFFF;
      }
      else
      {
        if (!(var3 == 0x00000003))
          goto label26;
        scePaf_11EFC5FD (var1, "%s/OMGAUDIO/SRCIDLST.BAK", "ms0:");
        goto label23;
      }
      goto label27;
    }
  }
  var9 = sp + 0x00000080;
  if (((((var3 ^ 0x00000001) < 0x00000001)) | ((var8 < 0x00000001))) != 0x00000000)
  {
    var39 = IoFileMgrForUser_ACE946E8 (var1, var9);
    var5 = 0xFFFFFFFF;
    if (var39 != 0x00000000)
    {

    label43:
      var10 = var5;
      if (!(var5 != 0x00000000))
      {
        var11 = sp + 0x00000080;

      label45:

      label46:
        var12 = sp;
        var15 = IoFileMgrForUser_ACE946E8 (var12, var11);
        if (var15 == 0x00000000)
        {
          var23 = sp;
          var26 = IoFileMgrForUser_109F50BC (var23, 0x00000001, 0x00000100);
          if (var26 < 0)
          {

          label63:
            var10 = 0xFFFFFFFF;
          }
          else
          {
            var27 = ((int *) sp)[34];
            var30 = IoFileMgrForUser_6A638D83 (var26, var4, var27);
            var31 = 0xFFFFFFFF;
            if (!(var30 < 0))
            {
              var34 = sceVshBridge_E174218C (var2, var4, arg2);
              var31 = var34;
            }
            IoFileMgrForUser_810C4BC3 (var26);
            var10 = var31;
          }
        }
        else
        {
          goto label63;
        }
      }
    }
    else
    {
      var40 = sp;
      var43 = IoFileMgrForUser_F27A9C51 (var40);
      if (var43 != 0x00000000)
      {
        var48 = sp;
        scePaf_ACB55E4C (var48, var1, 0x0000003F);
        var11 = sp + 0x00000080;
        goto label45;
      }
      else
      {
        var44 = sp;
        var47 = IoFileMgrForUser_779103A0 (var1, var44);
        if (var47 == 0x00000000)
        {
          goto label46;
        }
        else
        {
          goto label63;
        }
      }
    }
  }
  else
  goto label43;
  ra = ((int *) sp)[63];
  var16 = ((int *) sp)[62];
  var17 = ((int *) sp)[61];
  var18 = ((int *) sp)[60];
  var19 = ((int *) sp)[59];
  var20 = ((int *) sp)[58];
  var21 = ((int *) sp)[57];
  var22 = ((int *) sp)[56];
  sp = sp + 0x00000100;
  return var10;
}

/**
 * Subroutine at address 0x0002EBA4
 */
int sub_2EBA4 ()
{
  sp = sp + 0xFFFFFE00;
  ((int *) sp)[120] = s0;
  var1 = sp + 0x00000040;
  ((int *) sp)[124] = s4;
  ((int *) sp)[125] = ra;
  ((int *) sp)[123] = s3;
  var2 = sp + 0x00000080;
  ((int *) sp)[122] = s2;
  ((int *) sp)[121] = s1;
  scePaf_3762CCEE (var1, 0x00000000, 0x00000040);
  var5 = sp;
  scePaf_11EFC5FD (var5, "%s/OMGAUDIO/SRCIDLST.DAT", 0x0003B1F8);
  var8 = sp;
  var11 = IoFileMgrForUser_ACE946E8 (var8, var2);
  if (var11 < 0)
  {
    scePaf_11EFC5FD (var1, "%s/OMGAUDIO/SRCIDLST.BAK", 0x0003B1F8);
    var65 = IoFileMgrForUser_ACE946E8 (var1, var2);
    var17 = 0x00000000;
    if (var65 >= 0)
    {

    label15:
      var12 = sp + 0x000001D0;
      var15 = sceVshBridge_5E399F7B (var12, 0x00000004);
      var16 = var15;
      var17 = 0xFFFFFFFF;
      if (!(var15 != 0x00000000))
      {
        var18 = ((int *) sp)[116];
        var19 = sp + 0x000000E0;
        if (!((((var18 < 0x00000001)) | (((!var18) < 0x00000001))) != 0x00000000))
        {
          scePaf_11EFC5FD (var19, "%s/OMGAUDIO/%08X.DAT", "ms0:", var18);
          var22 = sp + 0x00000160;
          var25 = IoFileMgrForUser_ACE946E8 (var19, var22);
          var17 = 0xFFFFFFFF;
          if (!(var25 != 0x00000000))
          {
            var26 = ((int *) sp)[90];
            var29 = scePaf_31AC0624 (0x00000008, var26);
            var30 = var29;
            if (var29 == 0x00000000)
            {
              var16 = 0xFFFFFFFF;

            label41:
              if (var16 == 0x00000000)
              {
                var50 = scePaf_31AC0624 (0x00000008, 0x00008000);
                var51 = var50;
                if (!(var50 == 0x00000000))
                {
                  var52 = sp + 0x000001C0;
                  var55 = sub_2E998 (0xFFFFFFFF, var52, 0x00000002, var50);
                  if (var55 < 0)
                  {
                    var60 = sub_2E998 (0xFFFFFFFF, var52, 0x00000003, var51);
                    var16 = ((((var55 < 0xFFFFFFFF)) & (((!var60) < 0x00000001)))) ? 0xFFFFFFFF : (!(((var60 < 0xFFFFFFFF))) ? 0x00000000 : 0xFFFFFFFF);
                  }
                  scePaf_22FB4177 (var51);
                }
              }
            }
            else
            {
              scePaf_6439FDBC (var29, 0x00000000, var26);
              var35 = IoFileMgrForUser_109F50BC (var19, 0x00000001, 0x00000000);
              if (var35 < 0)
              {
                var16 = 0xFFFFFFFF;
              }
              else
              {
                var38 = IoFileMgrForUser_6A638D83 (var35, var30, var26);
                if (var38 == var26)
                {
                  ((int *) sp)[112] = (var30 + 0x00000020);
                  ((int *) sp)[113] = (var38 + 0xFFFFFFE0);
                }
                else
                {
                  var16 = 0xFFFFFFFF;
                }
                IoFileMgrForUser_810C4BC3 (var35);
                goto label41;
              }
            }
            var17 = var16;
            if (!(var30 == 0x00000000))
            {
              scePaf_22FB4177 (var30);
              var17 = var16;
            }
          }
        }
      }
      ra = ((int *) sp)[125];
    }
    else
    {
      ra = ((int *) sp)[125];
    }
  }
  else
  goto label15;
  var43 = ((int *) sp)[124];
  var44 = ((int *) sp)[123];
  var45 = ((int *) sp)[122];
  var46 = ((int *) sp)[121];
  var47 = ((int *) sp)[120];
  sp = sp + 0x00000200;
  return var17;
}

/**
 * Subroutine at address 0x0002EDD4
 */
int vsh_AF37F31D ()
{
  var1 = *((unsigned char *) 0x00049124);
  var2 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    var2 = *((int *) 0x000471C4);
  }
  return var2;
}

/**
 * Subroutine at address 0x0002EDF4
 */
void sub_2EDF4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  *((int *) 0x00049128) = var1;
  var4 = scePaf_5E00570F (arg2);
  ((int *) var1)[0] = var4;
  if (!(var4 == 0x00000000))
  {
    ((int *) var1)[1] = arg2;
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EE48
 */
void sub_2EE48 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  scePaf_6690204E (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EE64
 */
void vsh_C5ADE941 (int arg1, int arg2)
{
  var1 = ((int *) arg1)[2];
  var2 = 0x00000000;
  if (!(var1 != 0x00000000))
  {
    ((int *) arg1)[2] = arg2;
    var2 = ((int *) arg1)[0];
  }
  return;
}

/**
 * Subroutine at address 0x0002EE80
 */
void vsh_E23A3110 (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x0002EE88
 */
void vsh_D72478E9 ()
{
  var1 = *((int *) 0x00049128);
  return;
}

/**
 * Subroutine at address 0x0002EE94
 */
void sub_2EE94 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = ThreadManForUser_55C20A00 (0x0003B270, 0x00000200, 0x00000001, 0x00000000);
  *((int *) 0x0004912C) = var3;
  var6 = ThreadManForUser_E81CAF8F (0x0003B270, 0x0002EF40, 0x00000000);
  *((int *) 0x000476B4) = var6;
  if (var6 < 0)
  {
    *((int *) 0x000476B4) = 0x00000000;
  }
  else
  {
    sceVshBridge_85516E53 (0x00000001, var6);
  }
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EF0C
 */
void sub_2EF0C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_7B1BB05F (0x00000001);
  var3 = *((int *) 0x000476B4);
  ThreadManForUser_EDBA5844 (var3);
  var6 = *((int *) 0x0004912C);
  ThreadManForUser_EF9E4C70 (var6);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EF40
 */
void sub_2EF40 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[20] = s0;
  var1 = arg2;
  ((int *) sp)[22] = ra;
  ((int *) sp)[21] = s1;
  if ((arg2 & 0x00090000) == 0x00000000)
  {
    *((char *) 0x000476B9) = 0x00000000;

  label19:
    var3 = (var1 >> 17) & 0x00000003;
  }
  else
  {
    var2 = *((unsigned char *) 0x000476B9);
    if (var2 == 0x00000000)
    {
      var26 = *((int *) 0x0004912C);
      *((char *) 0x000476B9) = 0x00000001;
      ThreadManForUser_812346E4 (var26, 0xFFFFFFFE);
      ((int *) sp)[0] = 0x00049130;
      scePaf_BD500444 (0x00049130);
      ((int *) sp)[4] = 0x00000000;
      ((int *) sp)[8] = 0x00000000;
      var31 = *((int *) 0x00049150);
      var32 = ((int *) var31)[1];
      ((int *) sp)[12] = var31;
      ((int *) sp)[4] = var32;
      if (var32 != var31)
      {
        while (1) {
          var36 = ((int *) sp)[4];
          ((int *) sp)[8] = var36;
          ((int *) sp)[16] = var36;
          var37 = ((int *) var36)[2];
          var38 = ((int *) var36)[1];
          ((int *) sp)[8] = var38;
          sub_2F388 (var37);
          var41 = ((int *) sp)[8];
          ((int *) sp)[4] = var41;
          var42 = *((int *) 0x00049150);
          ((int *) sp)[12] = var42;
          if (var41 != var42)
            continue;
          break;
        }
      }
      var33 = ((int *) sp)[0];
      scePaf_6BEF472A (var33);
      var3 = (var1 >> 17) & 0x00000003;
    }
    else
    {
      goto label19;
    }
  }
  if (var3 == 0x00000000)
  {
    *((char *) 0x000476BB) = 0x00000000;
  }
  else
  {
    var4 = *((unsigned char *) 0x000476BB);
    if (var4 == 0x00000000)
    {
      var9 = *((int *) 0x0004912C);
      *((char *) 0x000476BB) = 0x00000001;
      ThreadManForUser_1FB15A32 (var9, 0x00000001);
      ((int *) sp)[0] = 0x00049130;
      scePaf_BD500444 (0x00049130);
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[12] = 0x00000000;
      var14 = *((int *) 0x00049150);
      var15 = ((int *) var14)[1];
      ((int *) sp)[8] = var14;
      ((int *) sp)[16] = var15;
      if (var15 != var14)
      {
        while (1) {
          var19 = ((int *) sp)[16];
          ((int *) sp)[12] = var19;
          ((int *) sp)[4] = var19;
          var20 = ((int *) var19)[2];
          var21 = ((int *) var19)[1];
          ((int *) sp)[12] = var21;
          sub_2F3B8 (var20);
          var24 = ((int *) sp)[12];
          ((int *) sp)[16] = var24;
          var25 = *((int *) 0x00049150);
          ((int *) sp)[8] = var25;
          if (var24 != var25)
            continue;
          break;
        }
      }
      var16 = ((int *) sp)[0];
      scePaf_6BEF472A (var16);
    }
    else
    {
    }
  }
  sceVshBridge_C3316528 (0x00000001);
  ra = ((int *) sp)[22];
  var7 = ((int *) sp)[21];
  var8 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0002F0E0
 */
void sub_2F0E0 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = ra;
  var1 = sp;
  var2 = *((int *) 0x0004912C);
  ThreadManForUser_A66B0120 (var2, var1);
  var5 = ((int *) sp)[11];
  ra = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002F10C
 */
void sub_2F10C (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = arg1;
  ((int *) arg1)[1] = arg3;
  ((int *) arg1)[2] = arg4;
  ((int *) var1)[5] = arg2;
  ((int *) var1)[6] = arg5;
  ((char *) var1)[0] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) var1)[4] = 0x00000000;
  ((int *) sp)[0] = 0x00049130;
  ((int *) sp)[9] = ra;
  scePaf_BD500444 (0x00049130);
  var4 = ((int *) var1)[6];
  var5 = sp + 0x00000010;
  if ((var4 & 0x00000002) == 0x00000000)
  {
    var12 = sp + 0x00000014;
    ((int *) sp)[5] = var1;
    sub_34070 (0x00049150, var12);
  }
  else
  {
    ((int *) sp)[4] = var1;
    sub_33FF0 (0x00049150, var5);
  }
  var8 = ((int *) sp)[0];
  scePaf_6BEF472A (var8);
  ra = ((int *) sp)[9];
  var11 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002F1A0
 */
void sub_2F1A0 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  ((int *) sp)[9] = ra;
  ((int *) sp)[0] = 0x00049130;
  scePaf_BD500444 (0x00049130);
  var3 = sp + 0x00000010;
  ((int *) sp)[4] = arg1;
  sub_340F0 (0x00049150, var3);
  var6 = ((int *) sp)[0];
  scePaf_6BEF472A (var6);
  ra = ((int *) sp)[9];
  var9 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002F1F0
 */
void sub_2F1F0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[7] = ra;
  var2 = ((unsigned char *) arg1)[0];
  var3 = 0x00000000;
  if (!(var2 != 0x00000000))
  {
    var4 = *((int *) 0x0004912C);
    ThreadManForUser_402FCF22 (var4, 0x00000001, 0x00000000, 0x00000000, 0x00000000);
    ((int *) sp)[0] = 0x00049130;
    scePaf_BD500444 (0x00049130);
    var9 = *((int *) 0x0004915C);
    if (var9 == 0x00000000)
    {
      sceSuspendForUser_3E0271D3 (0x00000000, 0x00000000, 0x00000000);
      var10 = ((int *) var1)[5];
    }
    else
    {
      var10 = ((int *) var1)[5];
    }
    if (!(var10 == 0x00000000))
    {
      var11 = ((int *) var1)[6];
      var14 = ThreadManForUser_C07BB470 ("SceVolatileMemory", 0x00000005, ((var11 & 0x00000001) << 0x0000000E), var10, 0x00000001, 0x00000000);
      ((int *) var1)[3] = var14;
      ThreadManForUser_623AE665 (var14, (var1 + 0x00000010));
    }
    var17 = *((int *) 0x0004915C);
    var18 = ((int *) sp)[0];
    ((char *) var1)[0] = 0x00000001;
    var3 = ((int *) var1)[4];
    *((int *) 0x0004915C) = (var17 + 0x00000001);
    scePaf_6BEF472A (var18);
  }
  ra = ((int *) sp)[7];
  var21 = ((int *) sp)[6];
  var22 = ((int *) sp)[5];
  var23 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002F2E8
 */
void sub_2F2E8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[0] = 0x00049130;
  ((int *) sp)[5] = ra;
  scePaf_BD500444 (0x00049130);
  var4 = ((int *) var1)[4];
  if (var4 != 0x00000000)
  {
    var16 = ((int *) var1)[3];
    ThreadManForUser_F6414A71 (var16);
    ((int *) var1)[4] = 0x00000000;
  }
  var5 = ((int *) var1)[3];
  if (var5 != 0x00000000)
  {
    ThreadManForUser_ED1410E0 (var5);
    ((int *) var1)[3] = 0x00000000;
  }
  var6 = *((int *) 0x0004915C);
  ((char *) var1)[0] = 0x00000000;
  var7 = var6 + 0xFFFFFFFF;
  *((int *) 0x0004915C) = var7;
  if (var7 == 0x00000000)
  {
    sceSuspendForUser_A569E425 (0x00000000);
  }
  var8 = ((int *) sp)[0];
  scePaf_6BEF472A (var8);
  ra = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002F388
 */
void sub_2F388 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  if (var1 != 0x00000000)
  {
    var4 var5 = (*var1) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F3B8
 */
void sub_2F3B8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[2];
  if (var1 != 0x00000000)
  {
    var4 var5 = (*var1) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F3E8
 */
void vsh_21871D45 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var3 = scePaf_48BB05D5 (0x0000001C);
  sub_2F10C (var3, arg1, arg2, arg3, arg4);
  ra = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002F45C
 */
void vsh_266BDCE1 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (!(arg1 == 0x00000000))
  {
    sub_2F1A0 (arg1);
    scePaf_4508F2FA (arg1);
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F490
 */
void vsh_3EA6BEA3 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2F1F0 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F4AC
 */
void vsh_24467A2B (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2F2E8 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F4C8
 */
void sub_2F4C8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_0658C (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F4E8
 */
void sub_2F4E8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_0658C (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F508
 */
int sub_2F508 (int arg1, int arg2)
{
  return (arg1 & (0x00000001 << (0x00000006 - arg2)));
}

/**
 * Subroutine at address 0x0002F520
 */
int sub_2F520 (int arg1)
{
  var1 = 0x00000002;
  if (!(arg1 < 0))
  {
    var2 = 0x00000000;
    var3 = 0x00000000 << 0x00000002;
    while (1) {
      var4 = ((int *) (var3 + 0x000453D8))[0];
      var5 = 0x00000000;
      if (var4 <= 0)
      {

      label9:
        var2 = var2 + 0x00000001;
        if (((var2 < 0x00000002)) != 0x00000000)
        {
          var3 = var2 << 0x00000002;
          continue;
        }
        else
        {
          var1 = 0x00000002;
        }
      }
      else
      {
        var6 = ((int *) (var3 + 0x0004703C))[0];
        var7 = ((int *) var6)[0];
        while (1) {
          var5 = var5 + 0x00000001;
          var6 = var6 + 0x00000004;
          var1 = var2;
          if (var7 == arg1)
            break;
          if (!(((var5 < var4)) != 0x00000000))
            goto label9;
          var7 = ((int *) var6)[0];
          continue;
        }
      }
    }
  }
  return var1;
}

/**
 * Subroutine at address 0x0002F594
 */
void sub_2F594 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  var1 = arg2 >> 0x0000001C;
  var2 = (arg2 >> 25) & 0x00000007;
  var3 = arg1;
  if ((var1 | var2) != 0x00000000)
  {
    if (((((var1 ^ 0x00000004) < 0x00000001)) & ((var2 < 0x00000001))) == 0x00000000)
    {

    label38:
    }
    else
    {
      if (arg1 < 0)
      {
        ((char *) arg3)[0] = 0x00000000;
      }
      else
      {
        ((char *) arg3)[0] = 0x00000001;
      }
      var6 = (var3 >> 21) & 0x0000007F;
      if (!((((var6 + 0x000007CF) < 0x0000270F)) == 0x00000000))
      {
        ((short *) arg4)[0] = (var6 + 0x000007D0);
      }
      var7 = (var3 >> 17) & 0x0000000F;
      if ((((var7 + 0xFFFFFFFF) < 0x0000000C)) != 0x00000000)
      {
        ((short *) arg4)[1] = var7;
      }
      var8 = (var3 >> 12) & 0x0000001F;
      if ((((var8 + 0xFFFFFFFF) < 0x0000001F)) != 0x00000000)
      {
        ((short *) arg4)[2] = var8;
      }
      var9 = var3 & 0x00000FFF;
      var10 = (((hi (var9 * 0x88888889)) + var9) >> 0x00000005) - (var9 >> 0x0000001F);
      if (((var10 < 0x00000018)) != 0x00000000)
      {
        ((short *) arg4)[3] = var10;
      }
      var11 = var9 - (((var10 << 0x00000004) - var10) << 0x00000002);
      if (((var11 < 0x0000003C)) != 0x00000000)
      {
        ((short *) arg4)[4] = var11;
      }
      ((int *) arg4)[3] = 0x00000000;
      ((short *) arg4)[5] = 0x00000000;
      ((int *) arg5)[0] = (arg2 & 0x00000FFF);
      ((int *) arg6)[0] = ((arg2 >> 12) & 0x0000007F);
    }
  }
  else
  {
    if (arg1 < 0)
    {
      if (arg3 != 0x00000000)
      {
        ((char *) arg3)[0] = 0x00000000;
      }
      if (!(arg4 == 0x00000000))
      {
        ((short *) arg4)[0] = 0x000007D0;
        ((short *) arg4)[2] = 0x00000001;
        ((int *) arg4)[3] = 0x00000000;
        ((short *) arg4)[1] = 0x00000001;
        ((short *) arg4)[3] = 0x00000000;
        ((short *) arg4)[4] = 0x00000000;
        ((short *) arg4)[5] = 0x00000000;
      }
      if (arg5 != 0x00000000)
      {
        ((int *) arg5)[0] = 0x00000000;
      }
      if (arg6 == 0x00000000)
        goto label38;
      ((int *) arg6)[0] = 0x00000000;
    }
    else
    {
      if (!(arg3 == 0x00000000))
      {
        ((char *) arg3)[0] = 0x00000001;
      }
      if (!(arg4 == 0x00000000))
      {
        ((short *) arg4)[0] = 0x000007D0;
        var4 = (hi (var3 * 0x88888889)) >> 0x00000005;
        ((short *) arg4)[2] = 0x00000001;
        ((short *) arg4)[1] = 0x00000001;
        if (!(((var4 < 0x00000018)) == 0x00000000))
        {
          ((short *) arg4)[3] = var4;
        }
        var5 = var3 - (((var4 << 0x00000004) - var4) << 0x00000002);
        if (((var5 < 0x0000003C)) != 0x00000000)
        {
          ((short *) arg4)[4] = var5;
        }
        ((int *) arg4)[3] = 0x00000000;
        ((short *) arg4)[5] = 0x00000000;
      }
      if (arg5 != 0x00000000)
      {
        ((int *) arg5)[0] = 0x00000000;
      }
      if (arg6 == 0x00000000)
        goto label38;
      ((int *) arg6)[0] = 0x000000EF;
    }
  }
  return;
}

/**
 * Subroutine at address 0x0002F754
 */
void sub_2F754 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  var1 = arg5;
  var2 = ((arg1 & 0x000000FF)) ? 0x00000000 : 0x80000000;
  if (!(var1 == 0x00000000))
  {
    ((int *) var1)[0] = var2;
    if (!(arg2 == 0x00000000))
    {
      var3 = ((unsigned short *) arg2)[0];
      var4 = ((unsigned short *) arg2)[3];
      var5 = ((unsigned short *) arg2)[1];
      var6 = ((unsigned short *) arg2)[2];
      var7 = ((unsigned short *) arg2)[4];
      ((int *) var1)[0] = ((((var2 | (((var3 + 0xFFFFF830) << 0x00000015) & 0x0FE00000)) | ((var5 << 0x00000011) & 0x001E0000)) | ((var6 << 0x0000000C) & 0x0001F000)) | (((((var4 << 0x00000004) - var4) << 0x00000002) + var7) & 0x00000FFF));
    }
  }
  if (arg6 != 0x00000000)
  {
    ((int *) arg6)[0] = (((arg3 & 0x00000FFF) | 0x40000000) | ((arg4 << 0x0000000C) & 0x0007F000));
  }
  return;
}

/**
 * Subroutine at address 0x0002F80C
 */
void sub_2F80C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x00049160);
  if (var1 == 0x00000000)
  {

  label7:
    if (arg1 == 0x00000000)
    {
      var9 = *((int *) 0x00047090);
      *((int *) 0x00047094) = var9;
      *((int *) 0x00047090) = 0xFFFFFFFF;
      ra = ((int *) sp)[0];
    }
    else
    {
      *((int *) 0x00047090) = 0xFFFFFFFF;
      var3 = *((int *) 0x00047094);
      ra = ((int *) sp)[0];
      if (var3 == 0xFFFFFFFF)
      {
        var4 = *((int *) 0x0004708C);
        ra = ((int *) sp)[0];
        if (!(var4 == 0x00000003))
        {
          var5 = *((int *) 0x0004708C);
          if (!(var5 != 0x00000002))
          {
            var8 = scePower_AC32C9CC ();
            ra = ((int *) sp)[0];
          }
        }
      }
    }
  }
  else
  {
    var2 = *((int *) 0x00047090);
    if (var2 == 0xFFFFFFFF)
    {
      *((int *) 0x00049164) = arg1;
      *((char *) 0x00049168) = 0x00000001;
      ra = ((int *) sp)[0];
    }
    else
    {
      goto label7;
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F8C4
 */
int sub_2F8C4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ThreadManForUser_19CFF145 (0x0004916C, "sceAlarmTaskMan_ApiLock", 0x00000300, 0x00000000, 0x00000000);
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var7 = sub_30C68 ();
  var8 = var7;
  sub_3051C ();
  if (var8 == 0x00000000)
  {
    *((int *) 0x0004708C) = 0x00000000;
  }
  else
  {
    *((int *) 0x0004708C) = 0x00000001;
  }
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var8;
}

/**
 * Subroutine at address 0x0002F958
 */
void sub_2F958 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var3 = *((int *) 0x0004708C);
  if (var3 == 0x00000001)
  {
    *((char *) 0x00049169) = var3;
  }
  else
  {
  }
  sub_2FE78 ();
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002F9C4
 */
void sub_2F9C4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var5 = sub_3070C ();
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002FA1C
 */
void sub_2FA1C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var5 = sub_3070C ();
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002FA74
 */
int sub_2FA74 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var3 = *((int *) 0x0004708C);
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[6];
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return (((var3 ^ 0x00000001) < 0x00000001));
}

/**
 * Subroutine at address 0x0002FAD0
 */
void vsh_36FF2839 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[24] = fp;
  ((int *) sp)[23] = s7;
  ((int *) sp)[20] = s4;
  var1 = arg3;
  ((int *) sp)[18] = s2;
  var2 = arg2 & 0x000000FF;
  ((int *) sp)[16] = s0;
  ((int *) sp)[22] = s6;
  var3 = arg1 << 0x00000002;
  ((int *) sp)[21] = s5;
  var4 = sp + 0x00000010;
  ((int *) sp)[19] = s3;
  ((int *) sp)[17] = s1;
  ((int *) sp)[25] = ra;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  if (var2 == 0x00000000)
  {

  label10:
    var7 = ((int *) (var3 + 0x00047044))[0];
    var8 = ((int *) (var3 + 0x00047068))[0];
    sceVshCommonUtil_D87E8E2D (var4, "/CONFIG/ALARM");
    var11 = sp + 0x00000030;
    var12 = sp + 0x00000034;
    ((int *) sp)[12] = 0x00000000;
    ((int *) sp)[13] = 0x00000000;
    sub_2F754 (var2, var1, arg4, arg5, var11, var12);
    var15 = ((int *) sp)[12];
    var18 = sceVshCommonUtil_2D4BC09F (var4, var7, var15);
    var19 = var18;
    if (!(var18 < 0))
    {
      var20 = ((int *) sp)[13];
      var23 = sceVshCommonUtil_2D4BC09F (var4, var8, var20);
      var19 = var23;
    }
    sub_3051C ();
    sceVshCommonUtil_625A9A5D (var4);
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  }
  else
  {
    if (!(var1 == 0x00000000))
      goto label10;
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  }
  ra = ((int *) sp)[25];
  var30 = ((int *) sp)[24];
  var31 = ((int *) sp)[23];
  var32 = ((int *) sp)[22];
  var33 = ((int *) sp)[21];
  var34 = ((int *) sp)[20];
  var35 = ((int *) sp)[19];
  var36 = ((int *) sp)[18];
  var37 = ((int *) sp)[17];
  var38 = ((int *) sp)[16];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0002FC20
 */
int vsh_FA7E09A0 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[24] = fp;
  ((int *) sp)[23] = s7;
  ((int *) sp)[22] = s6;
  ((int *) sp)[16] = s0;
  ((int *) sp)[25] = ra;
  var1 = arg1 << 0x00000002;
  ((int *) sp)[21] = s5;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  var2 = sp + 0x00000010;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var5 = ((int *) (var1 + 0x00047044))[0];
  var6 = ((int *) (var1 + 0x00047068))[0];
  sceVshCommonUtil_D87E8E2D (var2, "/CONFIG/ALARM");
  var9 = sp + 0x00000030;
  ((int *) sp)[12] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  var12 = sceVshCommonUtil_7A73DC84 (var2, var5, var9);
  var13 = var12;
  var14 = sp + 0x00000034;
  if (!(var12 < 0))
  {
    var17 = sceVshCommonUtil_7A73DC84 (var2, var6, var14);
    var13 = var17;
    if (!(var17 < 0))
    {
      var18 = ((int *) sp)[13];
      var19 = ((int *) sp)[12];
      sub_2F594 (var19, var18, arg2, arg3, arg4, arg5);
    }
  }
  sceVshCommonUtil_625A9A5D (var2);
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[25];
  var26 = ((int *) sp)[24];
  var27 = ((int *) sp)[23];
  var28 = ((int *) sp)[22];
  var29 = ((int *) sp)[21];
  var30 = ((int *) sp)[20];
  var31 = ((int *) sp)[19];
  var32 = ((int *) sp)[18];
  var33 = ((int *) sp)[17];
  var34 = ((int *) sp)[16];
  sp = sp + 0x00000070;
  return var13;
}

/**
 * Subroutine at address 0x0002FD50
 */
void vsh_A985BD99 ()
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  var1 = sp + 0x00000010;
  ((int *) sp)[17] = s1;
  var2 = sp + 0x00000020;
  ((int *) sp)[16] = s0;
  ((int *) sp)[20] = ra;
  var3 = 0x00000000;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var6 = 0x00000000;
  while (1) {
    var7 = sp + 0x00000030;
    var8 = sp + 0x00000034;
    var3 = var3 + 0x00000001;
    ((char *) sp)[16] = 0x00000000;
    ((int *) sp)[12] = 0x00000000;
    ((int *) sp)[13] = 0x00000000;
    var11 = vsh_FA7E09A0 (var6, var1, var2, var7, var8);
    if (var11 != 0x00000000)
      break;
    var12 = ((unsigned char *) sp)[16];
    if (var12 != 0x00000000)
    {
      Kernel_Library_15B6446B (0x0004916C, 0x00000001);
    }
    else
    {
      var6 = var3;
      if (((var3 < 0x00000009)) != 0x00000000)
        continue;
      break;
    }
    goto label16;
  }
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);

label16:
  ra = ((int *) sp)[20];
  var15 = ((int *) sp)[19];
  var16 = ((int *) sp)[18];
  var17 = ((int *) sp)[17];
  var18 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0002FE08
 */
void sub_2FE08 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var3 = *((int *) 0x0004708C);
  if (!(var3 == 0x00000003))
  {
    var4 = *((unsigned char *) 0x00049169);
    if (!(var4 == 0x00000000))
    {
      *((char *) 0x00049169) = 0x00000000;
    }
    *((int *) 0x0004708C) = 0x00000003;
  }
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002FE78
 */
void sub_2FE78 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s3;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[8] = ra;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var3 = *((int *) 0x0004708C);
  if (var3 == 0x00000002)
  {
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  }
  else
  {
    var4 = *((unsigned char *) 0x00049169);
    if (var4 != 0x00000000)
    {

    label12:
      sub_30170 ();
      var10 = *((unsigned char *) 0x00049169);
      if (var10 != 0x00000000)
      {
        *((char *) 0x00049169) = 0x00000000;
      }
    }
    else
    {
      var7 = sub_30C68 ();
      if (!(var7 == 0x00000000))
        goto label12;
    }
    sub_3051C ();
    *((int *) 0x0004708C) = 0x00000002;
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  }
  ra = ((int *) sp)[8];
  var15 = ((int *) sp)[7];
  var16 = ((int *) sp)[6];
  var17 = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002FF40
 */
void sub_2FF40 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[7] = ra;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  if (!(arg1 == 0x00000000))
  {
    var5 = sub_30C68 ();
    if (!(var5 == 0x00000000))
    {
      var6 = *((int *) 0x0004708C);
      if (var6 == 0x00000002)
      {
        var16 = *((int *) 0x00047094);
        if (var16 < 0)
        {
          var22 = *((int *) 0x00047090);
          if (var22 >= 0)
          {

          label13:
            sub_30170 ();
          }
          else
          {
          }
        }
        else
        goto label13;
        sub_3051C ();
        var21 = *((unsigned char *) 0x00049169);
        if (var21 != 0x00000000)
        {
          *((char *) 0x00049169) = 0x00000000;

        label26:
        }
        else
        {
        }
      }
      else
      {
        var7 = *((int *) 0x0004708C);
        if (var7 == 0x00000003)
        {
          var15 = *((unsigned char *) 0x00049169);
          if (var15 != 0x00000000)
          {
          }
          else
          {
            *((char *) 0x00049169) = 0x00000001;
          }
        }
        else
        {
          var8 = *((int *) 0x0004708C);
          var9 = *((int *) 0x0004708C);
          goto label26;
        }
      }
    }
  }
  Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  ra = ((int *) sp)[7];
  var12 = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00030040
 */
void vsh_AD0E864B (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[7] = ra;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var4 = *((int *) 0x00047094);
  if (var4 < 0)
  {
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  }
  else
  {
    *((int *) 0x00047094) = 0xFFFFFFFF;
    var5 = *((int *) 0x0004708C);
    if (var5 == 0x00000003)
    {
    }
    else
    {
      var6 = *((int *) 0x0004708C);
      if (var6 == 0x00000002)
      {
        var12 = *((unsigned char *) 0x00049169);
        if (var12 == 0x00000000)
        {
          var18 = sub_30C68 ();
        }
        else
        {
        }
        var13 = *((int *) 0x00047090);
        if (!(var13 != 0xFFFFFFFF))
        {
          if (var1 == 0x00000000)
          {

          label21:
            sub_31634 ();
          }
          else
          {
            if (var1 < 0)
              goto label21;
            if (!(((var1 < 0x00000003)) != 0x00000000))
              goto label21;
          }
        }
      }
      else
      {
      }
    }
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  }
  ra = ((int *) sp)[7];
  var9 = ((int *) sp)[6];
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00030138
 */
int sub_30138 ()
{
  var1 = *((int *) 0x00047090);
  var2 = 0x00000000;
  if (var1 == 0xFFFFFFFF)
  {
    var3 = *((int *) 0x00047094);
    if (var3 != var1)
    {
      var2 = 0x00000001;
    }
    else
    {
    }
  }
  else
  {
    var2 = 0x00000001;
  }
  return var2;
}

/**
 * Subroutine at address 0x00030170
 */
void sub_30170 ()
{
  sp = sp + 0xFFFFFF70;
  var1 = sp + 0x00000040;
  ((int *) sp)[33] = ra;
  ((int *) sp)[32] = fp;
  ((int *) sp)[31] = s7;
  ((int *) sp)[30] = s6;
  ((int *) sp)[29] = s5;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  var4 = sceRtc_3F7AD767 (var1);
  var5 = var4;
  if (!(var4 < 0))
  {
    var6 = sp;
    sceVshCommonUtil_D87E8E2D (var6, "/CONFIG/ALARM");
    var9 = *((int *) 0x00047094);
    var10 = 0xFFFFFFFF;
    var11 = 0x00000000;
    var14 = sub_2F520 (var9);
    var15 = *((int *) 0x00047090);
    var18 = sub_2F520 (var15);
    var19 = MIN (var18, var14);
    if (!(var19 <= 0))
    {
      while (1) {
        var20 = var11 << 0x00000002;
        var21 = ((int *) (var20 + 0x000453D8))[0];
        var22 = 0x00000000;
        if (!(var21 <= 0))
        {
          var23 = var20 + 0x0004703C;
          var24 = sp + 0x00000020;
          var25 = sp + 0x00000030;
          var26 = ((int *) var23)[0];
          while (1) {
            var27 = ((int *) ((var22 << 0x00000002) + var26))[0];
            var28 = sp + 0x00000048;
            var29 = sp + 0x0000004C;
            ((char *) sp)[32] = 0x00000000;
            ((int *) sp)[18] = 0x00000000;
            ((int *) sp)[19] = 0x00000000;
            var32 = vsh_FA7E09A0 (var27, var24, var25, var28, var29);
            if (var32 < 0)
            {
              var96 = ((unsigned char *) sp)[32];

            label35:
              var22 = var22 + 0x00000001;
            }
            else
            {
              var33 = ((unsigned char *) sp)[32];
              if (var33 != 0x00000000)
              {
                var82 = ((unsigned short *) sp)[27];
                if (((((var82 < 0x00000018)) ^ 0x00000001) | (((var82 < 0x0000003C)) ^ 0x00000001)) != 0x00000000)
                {
                  var22 = var22 + 0x00000001;
                }
                else
                {
                  var83 = ((int *) sp)[19];
                  var84 = sp + 0x00000040;
                  var85 = sp + 0x00000050;
                  var88 = sub_30728 (var84, var25, var83, var85);
                  if (var88 < 0)
                    goto label35;
                  if (var10 == 0xFFFFFFFF)
                  {
                    var95 = ((int *) sp)[21];

                  label33:
                    var93 = ((int *) sp)[20];
                    var94 = ((int *) sp)[21];
                    ((int *) sp)[22] = var93;
                    ((int *) sp)[23] = var94;
                    var10 = var27;
                    goto label35;
                  }
                  else
                  {
                    var89 = ((int *) sp)[21];
                    var90 = ((int *) sp)[23];
                    if (((var90 < var89)) != 0x00000000)
                      goto label33;
                    if (var89 != var90)
                    {
                      var22 = var22 + 0x00000001;
                    }
                    else
                    {
                      var91 = ((int *) sp)[22];
                      var92 = ((int *) sp)[20];
                      if (!(((var91 < var92)) == 0x00000000))
                        goto label33;
                      var22 = var22 + 0x00000001;
                    }
                  }
                }
              }
              else
              {
                var34 = ((unsigned short *) sp)[27];
                goto label35;
              }
            }
            if (!(((var22 < var21)) != 0x00000000))
              break;
            var26 = ((int *) var23)[0];
            continue;
          }
        }
        var35 = ((int *) sp)[23];
        if (var10 == 0xFFFFFFFF)
        {

        label45:
          var11 = var11 + 0x00000001;
          if (((var11 < var19)) != 0x00000000)
            continue;
        }
        else
        {
          var36 = ((int *) sp)[16];
          var37 = ((int *) sp)[17];
          var38 = var36 + 0xFC6C7900;
          var39 = (var37 + 0xFFFFFFFF) + ((var38 < 0xFC6C7900));
          if (((var39 < var35)) != 0x00000000)
            break;
          var40 = ((int *) sp)[22];
          if (var35 == var39)
          {
            if (((var38 < var40)) == 0x00000000)
            {
              var10 = 0xFFFFFFFF;
              goto label45;
            }
            else
            {
            }
          }
          else
          {
            var10 = 0xFFFFFFFF;
            goto label45;
          }
        }
      }
    }
    if (var10 == 0xFFFFFFFF)
    {
      var79 = sp;
      sceVshCommonUtil_625A9A5D (var79);
      var5 = 0xFFFFFFFF;
    }
    else
    {
      if (var10 == 0x00000000)
      {
        var68 = scePaf_A78805B0 ("topmenu_plugin");
        if (!(var68 == 0x00000000))
        {
          var71 = scePaf_4E87FDFC (var68, 0x00000001);
          if (!(var71 == 0x00000000))
          {
            *((int *) 0x00049164) = 0x00000000;
            __asm__ ("mtc1       $zr, $fpr12;");
            *((char *) 0x00049160) = 0x00000001;
            *((char *) 0x00049168) = 0x00000000;
            var72 = ((int *) var71)[16];
            var75 var76 = (*var72) (0x00000008, 0x00000007, 0x00000000, 0x00000000, 0x0002F80C, 0x00000000);
            if (var75 == 0x00000000)
            {
              var77 = *((unsigned char *) 0x00049168);
              if (!(var77 == 0x00000000))
              {
                var78 = *((int *) 0x00049164);
                var10 = 0xFFFFFFFF;
                if (!(var78 != 0x00000000))
                {
                  *((int *) 0x00047094) = 0x00000000;
                }
              }
            }
            else
            {
              var10 = 0xFFFFFFFF;
            }
            *((int *) 0x00049164) = 0x00000000;
            *((char *) 0x00049160) = 0x00000000;
            *((char *) 0x00049168) = 0x00000000;
          }
        }
      }
      else
      {
        if (!(var10 < 0))
        {
          if (!(((var10 < 0x00000009)) == 0x00000000))
          {
            var43 = scePaf_A78805B0 ("topmenu_plugin");
            if (!(var43 == 0x00000000))
            {
              var46 = scePaf_4E87FDFC (var43, 0x00000001);
              if (!(var46 == 0x00000000))
              {
                *((int *) 0x00049164) = 0x00000000;
                __asm__ ("mtc1       $zr, $fpr12;");
                *((char *) 0x00049160) = 0x00000001;
                var47 = ((int *) var46)[16];
                var50 var51 = (*var47) (0x00000019, 0x00000004, 0x00000000, 0x00000000, 0x0002F80C, 0x00000000);
                if (var50 != 0x00000000)
                {
                  var10 = 0xFFFFFFFF;
                }
                else
                {
                  var52 = *((unsigned char *) 0x00049168);
                  if (!(var52 == 0x00000000))
                  {
                    var53 = *((int *) 0x00049164);
                    if (var53 != 0x00000000)
                    {
                      var10 = 0xFFFFFFFF;
                    }
                    else
                    {
                      *((int *) 0x00047094) = var10;
                      var10 = 0xFFFFFFFF;
                    }
                  }
                }
                *((int *) 0x00049164) = 0x00000000;
                *((char *) 0x00049160) = 0x00000000;
              }
            }
          }
        }
      }
      var54 = sp;
      sceVshCommonUtil_625A9A5D (var54);
      if (!(var10 == 0xFFFFFFFF))
      {
        *((int *) 0x00047090) = var10;
      }
      var5 = var10;
    }
  }
  ra = ((int *) sp)[33];
  var57 = ((int *) sp)[32];
  var58 = ((int *) sp)[31];
  var59 = ((int *) sp)[30];
  var60 = ((int *) sp)[29];
  var61 = ((int *) sp)[28];
  var62 = ((int *) sp)[27];
  var63 = ((int *) sp)[26];
  var64 = ((int *) sp)[25];
  var65 = ((int *) sp)[24];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x0003051C
 */
void sub_3051C ()
{
  sp = sp + 0xFFFFFF70;
  var1 = sp + 0x00000040;
  ((int *) sp)[33] = ra;
  ((int *) sp)[32] = fp;
  ((int *) sp)[31] = s7;
  ((int *) sp)[30] = s6;
  ((int *) sp)[29] = s5;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  var4 = sceRtc_3F7AD767 (var1);
  var5 = var4;
  if (!(var4 < 0))
  {
    var6 = sp;
    ((int *) sp)[22] = 0x00000000;
    ((int *) sp)[23] = 0x00000000;
    var7 = 0xFFFFFFFF;
    sceVshCommonUtil_D87E8E2D (var6, "/CONFIG/ALARM");
    var10 = 0x00000000;
    while (1) {
      var11 = var10 << 0x00000002;
      var12 = ((int *) (var11 + 0x000453D8))[0];
      var13 = 0x00000000;
      if (!(var12 <= 0))
      {
        var14 = var11 + 0x0004703C;
        var15 = sp + 0x00000020;
        var16 = sp + 0x00000030;
        var17 = ((int *) var14)[0];
        while (1) {
          var18 = ((int *) ((var13 << 0x00000002) + var17))[0];
          var19 = sp + 0x00000048;
          var20 = sp + 0x0000004C;
          ((char *) sp)[32] = 0x00000000;
          ((int *) sp)[18] = 0x00000000;
          ((int *) sp)[19] = 0x00000000;
          var23 = vsh_FA7E09A0 (var18, var15, var16, var19, var20);
          if (var23 < 0)
          {
            var59 = ((unsigned char *) sp)[32];

          label30:
            var13 = var13 + 0x00000001;
          }
          else
          {
            var24 = ((unsigned char *) sp)[32];
            if (var24 != 0x00000000)
            {
              var45 = ((unsigned short *) sp)[27];
              var46 = ((unsigned short *) sp)[28];
              if (((((var45 < 0x00000018)) ^ 0x00000001) | (((var46 < 0x0000003C)) ^ 0x00000001)) != 0x00000000)
              {
                var13 = var13 + 0x00000001;
              }
              else
              {
                var47 = ((int *) sp)[19];
                var48 = sp + 0x00000040;
                var49 = sp + 0x00000050;
                var52 = sub_309C8 (var48, var16, var47, var49);
                if (var52 < 0)
                {
                  var13 = var13 + 0x00000001;
                }
                else
                {
                  var53 = ((int *) sp)[23];
                  if (var7 == 0xFFFFFFFF)
                  {

                  label28:
                    var57 = ((int *) sp)[20];
                    var58 = ((int *) sp)[21];
                    ((int *) sp)[22] = var57;
                    ((int *) sp)[23] = var58;
                    var7 = var18;
                    goto label30;
                  }
                  else
                  {
                    var54 = ((int *) sp)[21];
                    if (((var54 < var53)) != 0x00000000)
                      goto label28;
                    if (var53 != var54)
                    {
                      var13 = var13 + 0x00000001;
                    }
                    else
                    {
                      var55 = ((int *) sp)[20];
                      var56 = ((int *) sp)[22];
                      if (!(((var55 < var56)) == 0x00000000))
                        goto label28;
                      var13 = var13 + 0x00000001;
                    }
                  }
                }
              }
            }
            else
            {
              var25 = ((unsigned short *) sp)[27];
              goto label30;
            }
          }
          if (!(((var13 < var12)) != 0x00000000))
            break;
          var17 = ((int *) var14)[0];
          continue;
        }
      }
      var10 = var10 + 0x00000001;
      if (((var10 < 0x00000002)) != 0x00000000)
        continue;
      break;
    }
    if (var7 == 0xFFFFFFFF)
    {

    label38:
      var44 = sceVshBridge_A7401037 (0x00000000);
    }
    else
    {
      var26 = sp + 0x00000058;
      var29 = sceVshBridge_A7401037 (var26);
      if (var29 != 0x00000000)
        goto label38;
    }
    var30 = sp;
    sceVshCommonUtil_625A9A5D (var30);
    var5 = 0x00000000;
  }
  ra = ((int *) sp)[33];
  var33 = ((int *) sp)[32];
  var34 = ((int *) sp)[31];
  var35 = ((int *) sp)[30];
  var36 = ((int *) sp)[29];
  var37 = ((int *) sp)[28];
  var38 = ((int *) sp)[27];
  var39 = ((int *) sp)[26];
  var40 = ((int *) sp)[25];
  var41 = ((int *) sp)[24];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x0003070C
 */
int sub_3070C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sceVshBridge_A7401037 (0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x00030728
 */
int sub_30728 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[12] = s0;
  var3 = arg2;
  ((int *) sp)[16] = s4;
  var4 = arg4;
  ((int *) sp)[15] = s3;
  ((int *) sp)[13] = s1;
  ((int *) sp)[17] = ra;
  var5 = arg3;
  var8 = sceRtc_7ED29E40 (var2, var1);
  var9 = var8;
  if (!(var8 < 0))
  {
    var10 = ((int *) sp)[0];
    var11 = ((int *) sp)[1];
    ((int *) sp)[4] = var10;
    ((int *) sp)[5] = var11;
    var12 = ((int *) sp)[2];
    var13 = ((int *) sp)[3];
    ((int *) sp)[6] = var12;
    ((int *) sp)[7] = var13;
    var14 = ((unsigned short *) var3)[4];
    var15 = ((unsigned short *) var3)[0];
    var16 = ((unsigned short *) var3)[1];
    var17 = ((unsigned short *) var3)[2];
    var18 = ((unsigned short *) var3)[3];
    if (var5 == 0x00000000)
    {
      if ((((var15 + 0xFFFFFFFF) < 0x0000270F)) != 0x00000000)
      {
        ((short *) sp)[8] = var15;
      }
      if ((((var16 + 0xFFFFFFFF) < 0x0000000C)) != 0x00000000)
      {
        ((short *) sp)[9] = var16;
      }
      if ((((var17 + 0xFFFFFFFF) < 0x0000001F)) != 0x00000000)
      {
        ((short *) sp)[10] = var17;
      }
      if (((var18 < 0x00000018)) != 0x00000000)
      {
        ((short *) sp)[11] = var18;
      }
      if (((var14 < 0x0000003C)) != 0x00000000)
      {
        ((short *) sp)[12] = var14;
      }
      var59 = sp + 0x00000010;
      var60 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var63 = sceRtc_6FF40ACC (var59, var60);
      var64 = ((int *) var1)[0];
      var65 = ((int *) var1)[1];
      var66 = ((int *) sp)[9];
      var67 = var64 + 0x004C4B40;
      var68 = (var65 + 0x00000000) + ((var67 < 0x004C4B40));
      if (((var66 < var68)) != 0x00000000)
      {

      label47:
        var49 = ((int *) sp)[8];
        var50 = ((int *) sp)[9];
        var9 = 0x00000000;
        ((int *) var4)[0] = var49;
        ((int *) var4)[1] = var50;
      }
      else
      {
        var69 = ((int *) sp)[8];
        if (var66 != var68)
        {

        label21:
          var9 = 0xFFFFFFFE;
        }
        else
        {
          if (((var69 < var67)) != 0x00000000)
            goto label47;
          goto label21;
        }
      }
    }
    else
    {
      var19 = 0x800001FF;
      if (!(((var18 < 0x00000018)) == 0x00000000))
      {
        ((short *) sp)[11] = var18;
        var19 = 0x00000000;
      }
      var20 = 0x800001FF;
      if (!(((var14 < 0x0000003C)) == 0x00000000))
      {
        ((short *) sp)[12] = var14;
        var20 = 0x00000000;
      }
      var21 = sp + 0x00000010;
      var22 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var25 = sceRtc_6FF40ACC (var21, var22);
      var26 = ((var8 | var19) | var20) | var25;
      var9 = var26;
      if (!(var26 < 0))
      {
        var27 = ((int *) var1)[0];
        var28 = ((int *) var1)[1];
        var29 = ((int *) sp)[9];
        var30 = var27 + 0x004C4B40;
        var31 = (var28 + 0x00000000) + ((var30 < 0x004C4B40));
        var32 = 0x00000000;
        if (((var29 < var31)) != 0x00000000)
        {

        label34:
          var34 = ((unsigned short *) sp)[8];
        }
        else
        {
          var33 = ((int *) sp)[8];
          if (var29 == var31)
          {
            var58 = ((unsigned short *) sp)[8];
            if (!(((var33 < var30)) != 0x00000000))
            {
              var32 = 0xFFFFFFFF;
            }
          }
          else
          {
            var32 = 0xFFFFFFFF;
            goto label34;
          }
        }
        var35 = ((unsigned short *) sp)[9];
        var36 = ((unsigned short *) sp)[10];
        var37 = var32;
        var40 = sceRtc_57726BC1 (var34, var35, var36);
        var41 = var40;
        if (!(((var37 < 0xFFFFFFF9)) != 0x00000000))
        {
          var42 = var41 + var37;
          while (1) {
            var43 = (((hi (var42 * 0x92492493)) + var42) >> 0x00000002) - (var42 >> 0x0000001F);
            var44 = var42 - ((var43 << 0x00000003) - var43);
            var47 = sub_2F508 (var5, ((((var44 < 0x00000000))) ? (var44 + 0x00000007) : var44));
            var48 = sp + 0x00000020;
            if (var47 != 0x00000000)
            {
              sceRtc_E51B4B7A (var48, var48, var37);
            }
            else
            {
              var37 = var37 + 0xFFFFFFFF;
              if (!(((var37 < 0xFFFFFFF9)) == 0x00000000))
                break;
              var42 = var41 + var37;
              continue;
            }
          }
        }
        goto label47;
      }
    }
  }
  ra = ((int *) sp)[17];
  var51 = ((int *) sp)[16];
  var52 = ((int *) sp)[15];
  var53 = ((int *) sp)[14];
  var54 = ((int *) sp)[13];
  var55 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var9;
}

/**
 * Subroutine at address 0x000309C8
 */
int sub_309C8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[12] = s0;
  var3 = arg2;
  ((int *) sp)[16] = s4;
  var4 = arg4;
  ((int *) sp)[15] = s3;
  ((int *) sp)[13] = s1;
  ((int *) sp)[17] = ra;
  var5 = arg3;
  var8 = sceRtc_7ED29E40 (var2, var1);
  var9 = var8;
  if (!(var8 < 0))
  {
    var10 = ((int *) sp)[0];
    var11 = ((int *) sp)[1];
    var12 = ((int *) sp)[2];
    var13 = ((int *) sp)[3];
    ((int *) sp)[4] = var10;
    ((int *) sp)[5] = var11;
    ((int *) sp)[6] = var12;
    ((int *) sp)[7] = var13;
    var14 = ((unsigned short *) var3)[4];
    var15 = ((unsigned short *) var3)[0];
    var16 = ((unsigned short *) var3)[1];
    var17 = ((unsigned short *) var3)[2];
    var18 = ((unsigned short *) var3)[3];
    if (var5 == 0x00000000)
    {
      if ((((var15 + 0xFFFFFFFF) < 0x0000270F)) != 0x00000000)
      {
        ((short *) sp)[8] = var15;
      }
      if ((((var16 + 0xFFFFFFFF) < 0x0000000C)) != 0x00000000)
      {
        ((short *) sp)[9] = var16;
      }
      if ((((var17 + 0xFFFFFFFF) < 0x0000001F)) != 0x00000000)
      {
        ((short *) sp)[10] = var17;
      }
      if (((var18 < 0x00000018)) != 0x00000000)
      {
        ((short *) sp)[11] = var18;
      }
      if (((var14 < 0x0000003C)) != 0x00000000)
      {
        ((short *) sp)[12] = var14;
      }
      var59 = sp + 0x00000010;
      var60 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var63 = sceRtc_6FF40ACC (var59, var60);
      var64 = ((int *) var1)[0];
      var65 = ((int *) var1)[1];
      var66 = ((int *) sp)[9];
      var67 = var64 + 0x004C4B40;
      var68 = (var65 + 0x00000000) + ((var67 < 0x004C4B40));
      if (((var68 < var66)) != 0x00000000)
      {

      label47:
        var49 = ((int *) sp)[8];
        var50 = ((int *) sp)[9];
        var9 = 0x00000000;
        ((int *) var4)[0] = var49;
        ((int *) var4)[1] = var50;
      }
      else
      {
        var69 = ((int *) sp)[8];
        if (var66 != var68)
        {

        label21:
          var9 = 0xFFFFFFFD;
        }
        else
        {
          if (((var67 < var69)) != 0x00000000)
            goto label47;
          goto label21;
        }
      }
    }
    else
    {
      var19 = 0x800001FF;
      if (!(((var18 < 0x00000018)) == 0x00000000))
      {
        ((short *) sp)[11] = var18;
        var19 = 0x00000000;
      }
      var20 = 0x800001FF;
      if (!(((var14 < 0x0000003C)) == 0x00000000))
      {
        ((short *) sp)[12] = var14;
        var20 = 0x00000000;
      }
      var21 = sp + 0x00000010;
      var22 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var25 = sceRtc_6FF40ACC (var21, var22);
      var26 = ((var8 | var19) | var20) | var25;
      var9 = var26;
      if (!(var26 < 0))
      {
        var27 = ((int *) var1)[0];
        var28 = ((int *) var1)[1];
        var29 = ((int *) sp)[9];
        var30 = var27 + 0x004C4B40;
        var31 = (var28 + 0x00000000) + ((var30 < 0x004C4B40));
        var32 = 0x00000000;
        if (((var31 < var29)) != 0x00000000)
        {

        label34:
          var34 = ((unsigned short *) sp)[10];
        }
        else
        {
          var33 = ((int *) sp)[8];
          if (var29 == var31)
          {
            var58 = ((unsigned short *) sp)[10];
            if (!(((var30 < var33)) != 0x00000000))
            {
              var32 = 0x00000001;
            }
          }
          else
          {
            var32 = 0x00000001;
            goto label34;
          }
        }
        var35 = ((unsigned short *) sp)[8];
        var36 = ((unsigned short *) sp)[9];
        var37 = var32;
        var40 = sceRtc_57726BC1 (var35, var36, var34);
        var41 = var40;
        if (!(((var37 < 0x00000008)) == 0x00000000))
        {
          var42 = var41 + var37;
          while (1) {
            var43 = (((hi (var42 * 0x92492493)) + var42) >> 0x00000002) - (var42 >> 0x0000001F);
            var44 = var42 - ((var43 << 0x00000003) - var43);
            var47 = sub_2F508 (var5, ((((var44 < 0x00000007))) ? var44 : 0x00000000));
            var48 = sp + 0x00000020;
            if (var47 != 0x00000000)
            {
              sceRtc_E51B4B7A (var48, var48, var37);
            }
            else
            {
              var37 = var37 + 0x00000001;
              if (!(((var37 < 0x00000008)) != 0x00000000))
                break;
              var42 = var41 + var37;
              continue;
            }
          }
        }
        goto label47;
      }
    }
  }
  ra = ((int *) sp)[17];
  var51 = ((int *) sp)[16];
  var52 = ((int *) sp)[15];
  var53 = ((int *) sp)[14];
  var54 = ((int *) sp)[13];
  var55 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var9;
}

/**
 * Subroutine at address 0x00030C68
 */
int sub_30C68 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  var4 = sceRtc_3F7AD767 (var1);
  var5 = sp + 0x00000008;
  var6 = 0x00000000;
  if (var4 < 0)
  {

  label14:
    ra = ((int *) sp)[4];

  label15:
    var16 = var6;
  }
  else
  {
    var9 = sceRtc_C2DDBEB5 (var5);
    var6 = 0x00000000;
    if (var9 < 0)
      goto label14;
    var10 = ((int *) sp)[3];
    var11 = ((int *) sp)[2];
    ra = ((int *) sp)[4];
    if ((var11 | var10) == 0x00000000)
      goto label15;
    var12 = ((int *) sp)[0];
    var13 = ((int *) sp)[1];
    var14 = var12 + 0x004C4B40;
    var15 = (var13 + 0x00000000) + ((var14 < 0x004C4B40));
    var16 = 0x00000000;
    if (!(((var15 < var10)) != 0x00000000))
    {
      if (var10 == var15)
      {
        ra = ((int *) sp)[4];
        if (!(((var14 < var11)) != 0x00000000))
        {
          var6 = 0x00000001;
        }
      }
      else
      {
        var6 = 0x00000001;
        goto label14;
      }
      goto label15;
    }
  }
  sp = sp + 0x00000020;
  return var16;
}

/**
 * Subroutine at address 0x00030D04
 */
void vsh_30CD681C (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[29] = s1;
  ((int *) sp)[20] = arg2;
  ((int *) sp)[19] = arg1;
  ((int *) sp)[21] = arg3;
  ((int *) sp)[36] = fp;
  var1 = arg5;
  ((int *) sp)[35] = s7;
  var2 = arg6;
  ((int *) sp)[28] = s0;
  ((int *) sp)[37] = ra;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  Kernel_Library_BEA46419 (0x0004916C, 0x00000001, 0x00000000);
  var5 = ((int *) sp)[20];
  if (var5 == 0x00000000)
  {

  label7:
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
  }
  else
  {
    var6 = 0x00000000;
    if ((((var1 < 0x00000001)) | ((var2 < 0x00000001))) != 0x00000000)
      goto label7;
    ((int *) sp)[22] = arg4;
    ((int *) sp)[23] = 0x00000002;
    ((int *) sp)[24] = 0x00000000;
    while (1) {
      var7 = var6 << 0x00000002;
      var8 = ((int *) (var7 + 0x000453D8))[0];
      var9 = 0x00000000;
      if (!(var8 <= 0))
      {
        var10 = var7 + 0x0004703C;
        var11 = ((int *) var10)[0];
        while (1) {
          var12 = sp + 0x00000030;
          var13 = ((int *) ((var9 << 0x00000002) + var11))[0];
          var14 = sp + 0x00000020;
          var15 = var13 << 0x00000002;
          var16 = var15 + var2;
          var17 = var15 + var1;
          var18 = ((int *) sp)[19];
          ((int *) var17)[0] = 0x00000000;
          var19 = sp + 0x00000040;
          var20 = sp + 0x00000044;
          ((int *) var16)[0] = 0x00000000;
          if (var13 != var18)
          {
            ((char *) sp)[32] = 0x00000000;
            ((int *) sp)[16] = 0x00000000;
            ((int *) sp)[17] = 0x00000000;
            var35 = vsh_FA7E09A0 (var13, var14, var12, var19, var20);
            if (var35 < 0)
            {
              var53 = ((unsigned char *) sp)[32];

            label24:
              ((int *) var17)[0] = 0x00000000;
            }
            else
            {
              var36 = ((unsigned char *) sp)[32];
              var37 = ((int *) sp)[22];
              var38 = ((int *) sp)[23];
              var39 = ((int *) sp)[20];
              var40 = ((int *) sp)[21];
              if (!(var36 != 0x00000000))
                goto label24;
              var41 = ((int *) sp)[16];
              var42 = ((int *) sp)[17];
              var43 = sp + 0x00000048;
              ((int *) sp)[0] = var43;
              ((int *) sp)[1] = var17;
              ((int *) sp)[2] = var16;
              ((int *) sp)[18] = 0x00000000;
              var46 = vsh_31E9FD4E (var38, var39, var40, var37, var6, var12, var41, var42);
              var47 = var46;
              var48 = ((int *) sp)[24];
              if (var47 == 0x00000006)
              {
                var50 = ((int *) sp)[18];
                var51 = ((int *) sp)[22];
                ((int *) sp)[22] = (var51 & (!var50));
                var52 = ((int *) sp)[22];
                var47 = !(var52) ? 0x00000007 : var47;
              }
              var49 = ((int *) sp)[24];
              ((int *) sp)[24] = (((((var48 < 0x00000001)) | ((var49 < var47)))) ? var47 : var49);
            }
          }
          else
          {
            ((int *) sp)[23] = var6;
          }
          var9 = var9 + 0x00000001;
          if (!(((var9 < var8)) != 0x00000000))
            break;
          var11 = ((int *) var10)[0];
          continue;
        }
      }
      var6 = var6 + 0x00000001;
      if (((var6 < 0x00000002)) != 0x00000000)
        continue;
      break;
    }
    Kernel_Library_15B6446B (0x0004916C, 0x00000001);
    var23 = ((int *) sp)[24];
  }
  ra = ((int *) sp)[37];
  var24 = ((int *) sp)[36];
  var25 = ((int *) sp)[35];
  var26 = ((int *) sp)[34];
  var27 = ((int *) sp)[33];
  var28 = ((int *) sp)[32];
  var29 = ((int *) sp)[31];
  var30 = ((int *) sp)[30];
  var31 = ((int *) sp)[29];
  var32 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x00030F20
 */
int vsh_31E9FD4E (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = fp;
  var1 = 0x00000000;
  ((int *) sp)[15] = s7;
  var2 = 0x00000000;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  var3 = arg8;
  var4 = 0x00000000;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  var5 = 0x00000000;
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  var6 = arg2;
  ((int *) sp)[8] = s0;
  var7 = arg6;
  ((int *) sp)[17] = ra;
  var8 = ((unsigned short *) arg6)[3];
  var9 = ((unsigned short *) arg2)[3];
  var10 = ((unsigned short *) var7)[4];
  var11 = ((unsigned short *) var6)[4];
  var12 = (((var8 << 0x00000004) - var8) << 0x00000002) + var10;
  var13 = ((int *) sp)[20];
  var14 = ((int *) sp)[21];
  var15 = ((int *) sp)[22];
  var16 = var12 + arg7;
  var17 = (((var9 << 0x00000004) - var9) << 0x00000002) + var11;
  ((int *) var13)[0] = 0x00000000;
  var18 = 0x00000000;
  ((int *) sp)[1] = arg1;
  var19 = var17 + arg3;
  var20 = 0x00000000;
  ((int *) var14)[0] = 0x00000000;
  ((int *) sp)[3] = arg5;
  var21 = 0x00000000;
  ((int *) sp)[2] = arg4;
  ((int *) var15)[0] = 0x00000000;
  if (((var12 < var16)) == 0x00000000)
  {
    if (((var17 < var19)) == 0x00000000)
    {
      var73 = (var12 < var17);
      if (!(var12 != var17))
      {
        var21 = 0x00000001;
        var20 = 0x00000000;
        var73 = 0x00000000;
      }

    label17:
      if (!(var73 == 0x00000000))
      {

      label33:
        var4 = 0x00000000;
      }
    }
    else
    {
      var72 = var19 + 0xFFFFFA60;
      if (((var19 < 0x000005A0)) == 0x00000000)
      {
        var73 = (var12 < var17);
        if (((var72 < var12)) != 0x00000000)
        {
          if (var73 != 0x00000000)
          {
            goto label33;
          }
          else
          {
            var21 = 0x00000001;
            var20 = 0x00000000;
            goto label17;
          }
        }
        else
        {
          var21 = 0x00000001;
          var20 = 0xFFFFFFFF;
          if (!(var72 != var12))
          {
            var18 = 0x00000001;
          }
          goto label17;
        }
      }
      else
      {
        var73 = (var12 < var17);
        if (!(((var73 ^ 0x00000001) & (((var19 < var12)) ^ 0x00000001)) == 0x00000000))
        {
          var21 = 0x00000001;
          var20 = 0x00000000;
          if (var12 == var19)
          {
            var18 = 0x00000001;
          }
        }
        goto label17;
      }
    }

  label36:
    if (var21 == 0x00000000)
    {
      var71 = ((int *) sp)[2];
    }
    else
    {
      var24 = ((int *) sp)[2];
      var25 = var7;

    label66:
      ((int *) sp)[4] = var18;
      ((int *) sp)[5] = var4;
      var28 = sub_31444 (var25, var3, var20, var6, var24, var13);
      var29 = var28;
      var30 = ((int *) sp)[4];
      var4 = ((int *) sp)[5];
      if (var28 < 0)
      {
        if (var29 == 0xFFFFFFFE)
        {
          var60 = ((int *) sp)[3];
          var61 = ((int *) sp)[1];
          if (((var60 < var61)) == 0x00000000)
          {
            var64 = ((int *) var13)[0];
            if (var3 == var64)
            {

            label93:
              ((int *) var14)[0] = 0x00000004;
              var54 = ((int *) var15)[0];
              var55 = ((var2) ? (var54 | 0x00000002) : var54) | var30;
              ((int *) var15)[0] = var55;
              if (!(var55 != 0x00000000))
              {
                ((int *) var15)[0] = 0x00000004;
              }
              var5 = 0x00000004;
            }
            else
            {
              ((int *) var14)[0] = 0x00000003;
              var65 = ((int *) var15)[0];
              var66 = ((var2) ? (var65 | 0x00000002) : var65) | var30;
              ((int *) var15)[0] = var66;
              if (!(var66 != 0x00000000))
              {
                ((int *) var15)[0] = 0x00000004;
              }
              var5 = 0x00000003;
            }
          }
          else
          {
            ((int *) var14)[0] = 0x00000006;
            var62 = ((int *) var15)[0];
            var63 = ((var2) ? (var62 | 0x00000002) : var62) | var30;
            ((int *) var15)[0] = var63;
            if (!(var63 != 0x00000000))
            {
              ((int *) var15)[0] = 0x00000004;
            }
            var5 = 0x00000006;
          }
        }
        else
        {
          if (((var29 < 0xFFFFFFFF)) == 0x00000000)
          {
            var56 = ((int *) sp)[1];
            if (!(var29 != 0xFFFFFFFF))
            {
              var57 = ((int *) sp)[3];
              if (((var57 < var56)) == 0x00000000)
              {
                goto label93;
              }
              else
              {
                ((int *) var14)[0] = 0x00000007;
                var58 = ((int *) var15)[0];
                var59 = ((var2) ? (var58 | 0x00000002) : var58) | var30;
                ((int *) var15)[0] = var59;
                if (!(var59 != 0x00000000))
                {
                  ((int *) var15)[0] = 0x00000004;
                }
                var5 = 0x00000007;
              }
            }
          }
          else
          {
            var50 = ((int *) sp)[1];
            if (!(var29 != 0xFFFFFFFD))
            {
              var51 = ((int *) sp)[3];
              if (((var51 < var50)) == 0x00000000)
              {
                goto label93;
              }
              else
              {
                ((int *) var14)[0] = 0x00000005;
                var52 = ((int *) var15)[0];
                var53 = ((var2) ? (var52 | 0x00000002) : var52) | var30;
                ((int *) var15)[0] = var53;
                if (!(var53 != 0x00000000))
                {
                  ((int *) var15)[0] = 0x00000004;
                }
                var5 = 0x00000005;
              }
            }
          }
        }
      }
    }
    var31 = ((int *) sp)[2];
    if (var1 != 0x00000000)
    {
      var41 = sp;
      ((int *) sp)[0] = 0x00000000;
      var44 = sub_31444 (var7, var3, var4, var6, var31, var41);
      if (var44 >= 0)
      {
        var23 = var5;
      }
      else
      {
        if ((((var44 + 0x00000003) < 0x00000003)) == 0x00000000)
        {
          var23 = var5;
        }
        else
        {
          var45 = ((int *) sp)[3];
          var46 = ((int *) sp)[1];
          if (((var45 < var46)) == 0x00000000)
          {
            var49 = ((int *) var14)[0];
            if (var49 != 0x00000000)
            {
            }
            else
            {
              ((int *) var14)[0] = 0x00000001;
            }
            var5 = MAX (var5, 0x00000001);

          label118:
            var23 = var5;
          }
          else
          {
            var47 = ((int *) var14)[0];
            if (var47 != 0x00000000)
            {
              var48 = (var5 < 0x00000002);
            }
            else
            {
              ((int *) var14)[0] = 0x00000002;
              var48 = (var5 < 0x00000002);
            }
            if (var48 != 0x00000000)
            {
              var5 = 0x00000002;
              goto label118;
            }
            else
            {
              var23 = var5;
            }
          }
        }
      }
    }
    else
    goto label118;
  }
  else
  {
    if (((var17 < var19)) == 0x00000000)
    {
      var69 = var16 + 0xFFFFFA60;
      if (((var16 < 0x000005A0)) == 0x00000000)
      {
        var70 = (var17 < var12);
        if (((var69 < var17)) != 0x00000000)
        {
          if (var70 != 0x00000000)
          {
            goto label33;
          }
          else
          {
            var21 = 0x00000001;
            var20 = 0x00000000;

          label31:
            if (var70 != 0x00000000)
            {
              goto label33;
            }
            else
            {
              if (!(((var12 < var17)) == 0x00000000))
              {
                var1 = 0x00000001;
                var4 = 0xFFFFFFFF;
              }
            }
          }
        }
        else
        {
          var21 = 0x00000001;
          var20 = 0x00000001;
          if (!(var69 != var17))
          {
            var18 = 0x00000001;
          }
          goto label31;
        }
      }
      else
      {
        var70 = (var17 < var12);
        if (!(((var70 ^ 0x00000001) & (((var16 < var17)) ^ 0x00000001)) == 0x00000000))
        {
          var21 = 0x00000001;
          var20 = 0x00000000;
          if (var17 == var16)
          {
            var2 = 0x00000001;
          }
        }
        goto label31;
      }
      goto label36;
    }
    else
    {
      if (((0x000005A0 - var16) * (0x000005A0 - var19)) <= 0)
      {
        if (((var16 < 0x000005A1)) != 0x00000000)
        {
          if (((var19 < 0x000005A1)) != 0x00000000)
          {
            var23 = 0x00000000;
          }
          else
          {
            var68 = var19 + 0xFFFFFA60;
            if (((var68 < var12)) != 0x00000000)
            {
              if (((var16 < var17)) != 0x00000000)
              {
                var23 = 0x00000000;
              }
              else
              {
                var20 = 0x00000000;
                if (!(var17 != var16))
                {
                  var2 = 0x00000001;
                }

              label65:
                var24 = ((int *) sp)[2];
                var25 = var7;
                goto label66;
              }
            }
            else
            {
              var20 = 0xFFFFFFFF;
              if (!(var68 != var12))
              {
                var18 = 0x00000001;
              }
              goto label65;
            }
          }
        }
        else
        {
          var67 = var16 + 0xFFFFFA60;
          if (((var67 < var17)) != 0x00000000)
          {
            if (((var19 < var12)) != 0x00000000)
            {
              var23 = 0x00000000;
            }
            else
            {

            label63:
              var20 = 0x00000000;
              if (var12 == var19)
              {
                var18 = 0x00000001;
              }
              goto label65;
            }
          }
          else
          {
            var20 = 0x00000001;
            if (!(var67 != var17))
            {
              var2 = 0x00000001;
            }
            goto label65;
          }
        }
      }
      else
      {
        var22 = var16 ^ var17;
        if (((((var17 < var12)) ^ 0x00000001) & (((var16 < var17)) ^ 0x00000001)) != 0x00000000)
        {

        label62:
          var2 = (var22 < 0x00000001);
          goto label63;
        }
        else
        {
          var23 = 0x00000000;
          if (!(((((var12 < var17)) ^ 0x00000001) & (((var19 < var12)) ^ 0x00000001)) == 0x00000000))
          {
            var22 = var16 ^ var17;
            goto label62;
          }
        }
      }
    }
  }
  ra = ((int *) sp)[17];
  var32 = ((int *) sp)[16];
  var33 = ((int *) sp)[15];
  var34 = ((int *) sp)[14];
  var35 = ((int *) sp)[13];
  var36 = ((int *) sp)[12];
  var37 = ((int *) sp)[11];
  var38 = ((int *) sp)[10];
  var39 = ((int *) sp)[9];
  var40 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return var23;
}

/**
 * Subroutine at address 0x00031444
 */
int sub_31444 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[19] = s7;
  ((int *) sp)[18] = s6;
  ((int *) sp)[17] = s5;
  var1 = ((unsigned short *) arg4)[2];
  var2 = ((unsigned short *) arg4)[0];
  var3 = ((unsigned short *) arg4)[1];
  ((int *) sp)[14] = s2;
  var4 = arg3;
  ((int *) sp)[13] = s1;
  var5 = arg1;
  ((int *) sp)[20] = fp;
  ((int *) sp)[16] = s4;
  var6 = arg5;
  ((int *) sp)[12] = s0;
  var7 = arg2;
  ((int *) sp)[21] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[8] = arg6;
  var10 = sceRtc_57726BC1 (var2, var3, var1);
  var11 = sp + 0x00000010;
  var14 = sceRtc_6FF40ACC (var5, var11);
  if (var4 <= 0)
  {
    if (var4 < 0)
    {
      var7 = var7 << 0x00000001;
      if (!((var7 & 0x00000080) == 0x00000000))
      {
        var7 = ((var7 | 0x00000001) & 0xFFFFFF7F) | (0x00000000 & 0x00000001);
      }
      var48 = sp + 0x00000010;
      var49 = sp + 0x00000018;
      sceRtc_E51B4B7A (var49, var48, 0xFFFFFFFF);
      var52 = sp;
      var53 = sp + 0x00000018;
      var56 = sceRtc_7ED29E40 (var52, var53);
      var24 = ((unsigned short *) sp)[0];
      var25 = ((unsigned short *) sp)[1];
      var26 = ((unsigned short *) sp)[2];
    }
    else
    {
      var26 = ((unsigned short *) var5)[2];
      var24 = ((unsigned short *) var5)[0];
      var25 = ((unsigned short *) var5)[1];
    }
    var29 = sceRtc_57726BC1 (var24, var25, var26);
  }
  else
  {
    var15 = sp + 0x00000010;
    var16 = sp + 0x00000018;
    sceRtc_E51B4B7A (var16, var15, 0x00000001);
    var19 = sp;
    var20 = sp + 0x00000018;
    var23 = sceRtc_7ED29E40 (var19, var20);
    var24 = ((unsigned short *) sp)[0];
    var25 = ((unsigned short *) sp)[1];
    var26 = ((unsigned short *) sp)[2];
    var29 = sceRtc_57726BC1 (var24, var25, var26);
    var7 = (((var7 & 0x00000001)) ? (var7 | 0x00000080) : var7) >> 0x00000001;
  }
  if (var7 == 0x00000000)
  {
    if (var6 == 0x00000000)
    {
      if (((((var24 ^ var2) < 0x00000001)) & (((var25 ^ var3) < 0x00000001))) == 0x00000000)
      {
        var32 = 0x00000000;

      label45:
        ra = ((int *) sp)[21];
      }
      else
      {
        var32 = 0xFFFFFFFF;
        if (var26 != var1)
        {

        label44:
          var32 = 0x00000000;
          goto label45;
        }
        else
        {
          ra = ((int *) sp)[21];
        }
      }
    }
    else
    {
      var31 = sub_2F508 (var6, var29);
      var32 = 0xFFFFFFFD;

    label43:
      ra = ((int *) sp)[21];
      if (!(var31 != 0x00000000))
        goto label44;
    }
  }
  else
  {
    if (var6 == 0x00000000)
    {
      var31 = sub_2F508 (var7, var10);
      var32 = 0xFFFFFFFF;
      goto label43;
    }
    else
    {
      var30 = ((int *) sp)[8];
      var31 = var7 & var6;
      ((int *) var30)[0] = var31;
      var32 = 0xFFFFFFFF;
      if (var31 == var6)
        goto label45;
      var32 = 0xFFFFFFFE;
      goto label43;
    }
  }
  var33 = ((int *) sp)[20];
  var34 = ((int *) sp)[19];
  var35 = ((int *) sp)[18];
  var36 = ((int *) sp)[17];
  var37 = ((int *) sp)[16];
  var38 = ((int *) sp)[15];
  var39 = ((int *) sp)[14];
  var40 = ((int *) sp)[13];
  var41 = ((int *) sp)[12];
  sp = sp + 0x00000060;
  return var32;
}

/**
 * Subroutine at address 0x00031634
 */
void sub_31634 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_30138 ();
  var4 = 0xFFFFFFFF;
  if (!(var3 != 0x00000000))
  {
    var7 = scePower_AC32C9CC ();
    var4 = var7;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031668
 */
void vsh_30E1F1DF (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_30138 ();
  var4 = 0xFFFFFFFF;
  if (!(var3 != 0x00000000))
  {
    var7 = sceVshBridge_4A596D2D (0x00200000, arg1);
    var4 = var7;
  }
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000316AC
 */
int sub_316AC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = 0x00000000;
  ((int *) sp)[0] = s0;
  var2 = arg1 + 0x00000078;
  ((int *) sp)[6] = ra;
  var3 = 0x0000000F;
  var6 var7 = sub_00608 (arg3, arg4);
  var8 = var6;
  var9 = var8 & 0x00000000;
  var10 = var7 & 0xFFFFFFFF;
  var11 = var8;
  while (1) {
    var14 var15 = sub_00748 (var1, var11);
    var16 = ((int *) var2)[0];
    var17 = ((int *) var2)[1];
    var3 = var3 + 0xFFFFFFFF;
    var2 = var2 + 0xFFFFFFF8;
    var18 = var15 ^ var17;
    var21 var22 = sub_0085C ((((var14 ^ var16) >> 0x00000010) | (var18 << 0x00000010)), (var18 >> 0x00000010));
    var25 var26 = sub_00788 (var21, var22);
    var27 = var25 ^ var9;
    var28 = var26 ^ var10;
    var9 = var1;
    var10 = var11;
    var1 = var27;
    var11 = var28;
    if (var3 >= 0)
      continue;
    break;
  }
  var31 var32 = sub_006A8 ((var27 | var10), (var28 | 0x00000000));
  ra = ((int *) sp)[6];
  var33 = ((int *) sp)[5];
  var34 = ((int *) sp)[4];
  var35 = ((int *) sp)[3];
  var36 = ((int *) sp)[2];
  var37 = ((int *) sp)[1];
  var38 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var31 var32;
}

/**
 * Subroutine at address 0x000317B8
 */
int sub_317B8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_008C0 (arg1, arg2, arg3, arg4);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return 0x00000000;
}

/**
 * Subroutine at address 0x000317D8
 */
void sub_317D8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    scePaf_6690204E (var1);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031808
 */
void sub_31808 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_31B64 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031824
 */
int sub_31824 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[21] = s1;
  var1 = sp + 0x00000030;
  ((int *) sp)[20] = s0;
  ((int *) sp)[24] = s4;
  ((int *) sp)[25] = ra;
  ((int *) sp)[23] = s3;
  var2 = sp + 0x00000008;
  ((int *) sp)[22] = s2;
  var3 = sp + 0x00000044;
  ((int *) sp)[2] = 0x00000000;
  ((int *) sp)[12] = 0x00000000;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  ((int *) sp)[3] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  sub_31940 (var1, arg2);
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  ((int *) sp)[16] = var6;
  ((int *) sp)[17] = 0x00000000;
  ((int *) sp)[15] = var7;
  ((int *) sp)[18] = 0x00000000;
  sub_31940 (var3, var2);
  var12 = sub_31B90 (arg1, var1, 0x00000000);
  sub_317D8 (var3);
  sub_317D8 (var1);
  sub_317D8 (var2);
  ra = ((int *) sp)[25];
  var19 = ((int *) sp)[24];
  var20 = ((int *) sp)[23];
  var21 = ((int *) sp)[22];
  var22 = ((int *) sp)[21];
  var23 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return (var12 + 0x00000018);
}

/**
 * Subroutine at address 0x000318F0
 */
void sub_318F0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (!(arg2 == 0x00000000))
  {
    var1 = scePaf_967A56EF (arg2);
  }
  sub_31DA0 (arg1, arg2, var1);
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031940
 */
void sub_31940 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[3] = ra;
  var3 = ((int *) arg1)[0];
  if (!(var3 == 0x00000000))
  {
    scePaf_6690204E (var3);
  }
  var6 = ((int *) var2)[1];
  if (var6 != 0x00000000)
  {
    var12 = scePaf_5E00570F ((var6 + 0x00000001));
    ((int *) var1)[0] = var12;
    var13 = ((int *) var2)[1];
    var14 = ((int *) var2)[0];
    ((int *) var1)[1] = var13;
    scePaf_3447707B (var12, var14, (var13 + 0x00000001));
  }
  else
  {
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000319D4
 */
void sub_319D4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg1)[1];
  var2 = ((int *) arg1)[2];
  var3 = arg1;
  if (((var2 < (var1 + 0x00000001))) != 0x00000000)
  {
    sub_31E4C (arg1, (var2 + 0x0000000A));
    var1 = ((int *) var3)[1];
  }
  var4 = ((int *) var3)[0];
  var5 = var4 + (var1 << 0x00000002);
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[0] = var6;
  }
  ((int *) var3)[1] = (var1 + 0x00000001);
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031A48
 */
void sub_31A48 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[0];
  if (var2 == 0x00000000)
  {
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = ((int *) var1)[1];
    if (var3 <= 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 != 0x00000000))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_6690204E (var2);
    ((int *) var1)[2] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031A9C
 */
void sub_31A9C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[0];
  if (var2 == 0x00000000)
  {
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = ((int *) var1)[1];
    if (var3 <= 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 != 0x00000000))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_6690204E (var2);
    ((int *) var1)[2] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031AF0
 */
void sub_31AF0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg1)[1];
  var2 = ((int *) arg1)[2];
  var3 = arg1;
  if (((var2 < (var1 + 0x00000001))) != 0x00000000)
  {
    sub_31F0C (arg1, (var2 + 0x0000000A));
    var1 = ((int *) var3)[1];
  }
  var4 = ((int *) var3)[0];
  var5 = var4 + (var1 << 0x00000002);
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[0] = var6;
  }
  ((int *) var3)[1] = (var1 + 0x00000001);
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031B64
 */
void sub_31B64 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_31FCC (arg1);
  var3 = ((int *) arg1)[0];
  scePaf_6690204E (var3);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031B90
 */
int sub_31B90 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s6;
  var1 = arg3;
  ((int *) sp)[9] = s5;
  var2 = arg1;
  ((int *) sp)[8] = s4;
  var3 = 0x00000000;
  ((int *) sp)[6] = s2;
  ((int *) sp)[11] = ra;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var4 = ((int *) arg1)[0];
  var5 = ((int *) var4)[0];
  var6 = ((char *) var5)[45];
  var7 = arg2;
  if (var6 != 0x00000000)
  {

  label26:
    var16 = scePaf_5E00570F (0x00000030);
    var5 = var16;
    if (!(var16 == 0x00000000))
    {
      var17 = ((int *) var2)[0];
      var18 = var16 + 0x0000000C;
      ((int *) var5)[2] = var17;
      ((int *) var5)[1] = var17;
      ((int *) var5)[0] = var4;
      ((int *) var5)[3] = 0x00000000;
      ((int *) var18)[1] = 0x00000000;
      sub_31940 (var18, var7);
      var21 = ((int *) var7)[4];
      var22 = ((int *) var7)[3];
      var23 = var5 + 0x00000020;
      ((int *) var5)[7] = var21;
      ((int *) var5)[6] = var22;
      ((int *) var5)[8] = 0x00000000;
      ((int *) var23)[1] = 0x00000000;
      sub_31940 (var23, (var7 + 0x00000014));
      ((char *) var5)[44] = 0x00000001;
      ((char *) var5)[45] = 0x00000000;
    }
    if (var3 != 0x00000000)
    {
      if (var3 < 0)
      {
        ((int *) var4)[1] = var5;
        var42 = ((int *) var2)[0];
        var43 = ((int *) var42)[1];
        if (var4 == var43)
        {
          ((int *) var42)[1] = var5;

        label44:
          var29 = ((int *) var2)[1];
        }
        else
        {
          var29 = ((int *) var2)[1];
        }
      }
      else
      {
        ((int *) var4)[2] = var5;
        var40 = ((int *) var2)[0];
        var41 = ((int *) var40)[2];
        if (var4 == var41)
        {
          ((int *) var40)[2] = var5;
          goto label44;
        }
        else
        {
          var29 = ((int *) var2)[1];
        }
      }
    }
    else
    {
      var26 = ((int *) var2)[0];
      ((int *) var26)[0] = var5;
      var27 = ((int *) var2)[0];
      ((int *) var27)[1] = var5;
      var28 = ((int *) var2)[0];
      ((int *) var28)[2] = var5;
      goto label44;
    }
    ((int *) var2)[1] = (var29 + 0x00000001);
    sub_320A8 (var2, var5);
    if (!(var1 == 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
    }

  label49:
    var32 = var5;
  }
  else
  {
    var8 = ((int *) var7)[0];
    while (1) {
      var9 = ((int *) var5)[3];
      var4 = var5;
      var10 = ((char *) var8)[0];
      var11 = ((char *) var9)[0];
      var12 = 0x00000000;
      if (((var10 < var11)) == 0x00000000)
      {
        var54 = scePaf_E3D530AE (var8, var9);
        if (!(var54 >= 0))
        {
          var12 = 0x00000001;
        }
      }
      else
      {
        var12 = 0x00000001;
      }
      if (var12 == 0x00000000)
      {
        var44 = ((int *) var5)[3];
        var45 = ((int *) var7)[0];
        var46 = ((char *) var44)[0];
        var47 = ((char *) var45)[0];
        var48 = 0x00000000;
        if (((var46 < var47)) == 0x00000000)
        {
          var51 = scePaf_E3D530AE (var44, var45);
          if (!(var51 >= 0))
          {
            var48 = 0x00000001;
          }
        }
        else
        {
          var48 = 0x00000001;
        }
        var3 = 0x00000001;
        if (var48 == 0x00000000)
        {
          if (var1 != 0x00000000)
          {
            ((char *) var1)[0] = 0x00000000;
            goto label49;
          }
          else
          {
            var32 = var5;
          }
        }
        else
        {
          var5 = ((int *) var5)[2];

        label24:
          var13 = ((char *) var5)[45];
          if (!(var13 == 0x00000000))
            break;
          var8 = ((int *) var7)[0];
          continue;
        }
      }
      else
      {
        var5 = ((int *) var5)[1];
        var3 = 0xFFFFFFFF;
        goto label24;
      }
      goto label50;
    }
    goto label26;
  }

label50:
  ra = ((int *) sp)[11];
  var33 = ((int *) sp)[10];
  var34 = ((int *) sp)[9];
  var35 = ((int *) sp)[8];
  var36 = ((int *) sp)[7];
  var37 = ((int *) sp)[6];
  var38 = ((int *) sp)[5];
  var39 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var32;
}

/**
 * Subroutine at address 0x00031DA0
 */
void sub_31DA0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  var3 = arg1;
  ((int *) sp)[4] = ra;
  var4 = ((int *) arg1)[0];
  if (!(var4 == 0x00000000))
  {
    scePaf_6690204E (var4);
  }
  if (var2 == 0x00000000)
  {

  label12:
    ((int *) var3)[0] = 0x00000000;
    ((int *) var3)[1] = 0x00000000;
  }
  else
  {
    var7 = ((char *) var2)[0];
    if (!(var7 != 0x00000000))
      goto label12;
    var14 = scePaf_5E00570F ((var1 + 0x00000001));
    ((int *) var3)[0] = var14;
    ((int *) var3)[1] = var1;
    scePaf_3447707B (var14, var2, var1);
    var17 = ((int *) var3)[0];
    ((char *) (var17 + var1))[0] = 0x00000000;
  }
  ra = ((int *) sp)[4];
  var8 = ((int *) sp)[3];
  var9 = ((int *) sp)[2];
  var10 = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00031E4C
 */
void sub_31E4C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (var2 != 0x00000000)
  {
    var12 = scePaf_5E00570F ((arg2 << 0x00000002));
    var13 = ((int *) var3)[1];
    var14 = var12;
    var15 = 0x00000000;
    if (var13 <= 0)
    {
      var23 = ((int *) var3)[0];
    }
    else
    {
      var16 = ((int *) var3)[0];
      var17 = 0x00000000 << 0x00000002;
      while (1) {
        var18 = var14 + var17;
        var15 = var15 + 0x00000001;
        if (!(var18 == 0x00000000))
        {
          var19 = ((int *) (var16 + var17))[0];
          ((int *) var18)[0] = var19;
        }
        var17 = var15 << 0x00000002;
        if (((var15 < var13)) != 0x00000000)
          continue;
        break;
      }
    }
    if (!(var13 <= 0))
    {
      var20 = var13 + 0xFFFFFFFF;
      while (1) {
        if (!(var20 != 0x00000000))
          break;
        var20 = var20 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_6690204E (var16);
    ((int *) var3)[2] = var1;
    ((int *) var3)[0] = var14;
  }
  else
  {
    var6 = scePaf_5E00570F ((arg2 << 0x00000002));
    ((int *) var3)[0] = var6;
    ((int *) var3)[2] = var1;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031F0C
 */
void sub_31F0C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (var2 != 0x00000000)
  {
    var12 = scePaf_5E00570F ((arg2 << 0x00000002));
    var13 = ((int *) var3)[1];
    var14 = var12;
    var15 = 0x00000000;
    if (var13 <= 0)
    {
      var23 = ((int *) var3)[0];
    }
    else
    {
      var16 = ((int *) var3)[0];
      var17 = 0x00000000 << 0x00000002;
      while (1) {
        var18 = var14 + var17;
        var15 = var15 + 0x00000001;
        if (!(var18 == 0x00000000))
        {
          var19 = ((int *) (var16 + var17))[0];
          ((int *) var18)[0] = var19;
        }
        var17 = var15 << 0x00000002;
        if (((var15 < var13)) != 0x00000000)
          continue;
        break;
      }
    }
    if (!(var13 <= 0))
    {
      var20 = var13 + 0xFFFFFFFF;
      while (1) {
        if (!(var20 != 0x00000000))
          break;
        var20 = var20 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_6690204E (var16);
    ((int *) var3)[2] = var1;
    ((int *) var3)[0] = var14;
  }
  else
  {
    var6 = scePaf_5E00570F ((arg2 << 0x00000002));
    ((int *) var3)[0] = var6;
    ((int *) var3)[2] = var1;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031FCC
 */
void sub_31FCC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[4] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[45];
  var4 = arg1;
  if (!(var3 != 0x00000000))
  {
    var5 = ((int *) var2)[1];
    while (1) {
      var6 = ((char *) var5)[45];
      if (var6 == 0x00000000)
      {
        var2 = var5;
      }
      else
      {
        var7 = ((int *) var2)[2];
        var8 = ((char *) var7)[45];
        if (var8 != 0x00000000)
        {
          var16 = ((int *) var2)[0];
          var17 = ((char *) var16)[45];
          var18 = var2 + 0x00000020;
          if (!(var17 != 0x00000000))
          {
            var19 = ((int *) var16)[1];
            if (var19 == var2)
            {
              var27 = ((int *) var4)[0];
              ((int *) var16)[1] = var27;
            }
            else
            {
              var20 = ((int *) var4)[0];
              ((int *) var16)[2] = var20;
            }
            var18 = var2 + 0x00000020;
          }
          sub_317D8 (var18);
          sub_317D8 ((var2 + 0x0000000C));
          scePaf_6690204E (var2);
          var2 = var16;
        }
        else
        {
          var2 = var7;
        }
      }
      var9 = ((char *) var2)[45];
      if (!(var9 == 0x00000000))
        break;
      var5 = ((int *) var2)[1];
      continue;
    }
    var1 = ((int *) var4)[0];
  }
  ((int *) var1)[0] = var1;
  var10 = ((int *) var4)[0];
  ((int *) var4)[1] = 0x00000000;
  ((int *) var10)[1] = var10;
  ra = ((int *) sp)[4];
  var11 = ((int *) var4)[0];
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[3];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  ((int *) var11)[2] = var11;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000320A8
 */
void sub_320A8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((char *) arg2)[44] = 0x00000001;
  var2 = ((int *) arg1)[0];
  var3 = ((int *) var2)[0];
  var4 = arg2;
  if (arg2 == var3)
  {

  label32:
    ra = ((int *) sp)[3];
  }
  else
  {
    var5 = ((int *) arg2)[0];
    var6 = ((char *) var5)[44];
    var7 = var5;
    if (var6 == 0x00000000)
    {

    label31:
      var3 = ((int *) var2)[0];
      goto label32;
    }
    else
    {
      while (1) {
        var8 = ((int *) var5)[0];
        var9 = ((int *) var8)[1];
        if (var5 == var9)
        {
          var9 = ((int *) var8)[2];
          var21 = ((char *) var9)[44];
          if (var21 != 0x00000000)
          {
            var4 = var8;

          label28:
            ((char *) var5)[44] = 0x00000000;
            ((char *) var9)[44] = 0x00000000;
            ((char *) var8)[44] = 0x00000001;
            var2 = ((int *) var1)[0];
          }
          else
          {
            var22 = ((int *) var5)[2];
            if (var4 == var22)
            {
              var4 = var5;
              sub_321E0 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var23 = ((int *) var7)[0];
            ((char *) var7)[44] = 0x00000000;
            ((char *) var23)[44] = 0x00000001;
            sub_32234 (var1, var23);
            var2 = ((int *) var1)[0];
          }
        }
        else
        {
          var10 = ((char *) var9)[44];
          if (var10 == 0x00000000)
          {
            var15 = ((int *) var5)[1];
            if (var4 == var15)
            {
              var4 = var5;
              sub_32234 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var16 = ((int *) var7)[0];
            ((char *) var7)[44] = 0x00000000;
            ((char *) var16)[44] = 0x00000001;
            sub_321E0 (var1, var16);
            var2 = ((int *) var1)[0];
          }
          else
          {
            var4 = var8;
            goto label28;
          }
        }
        var3 = ((int *) var2)[0];
        ra = ((int *) sp)[3];
        if (var4 == var3)
          break;
        var5 = ((int *) var4)[0];
        var11 = ((char *) var5)[44];
        var7 = var5;
        if (var11 != 0x00000000)
          continue;
        goto label31;
      }
    }
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  ((char *) var3)[44] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000321E0
 */
void sub_321E0 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[2];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[45];
  ((int *) arg2)[2] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[45];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[1];
    if (arg2 == var8)
    {
      ((int *) var5)[1] = var1;
    }
    else
    {
      ((int *) var5)[2] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[1] = arg2;
  return;
}

/**
 * Subroutine at address 0x00032234
 */
void sub_32234 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[1];
  var2 = ((int *) var1)[2];
  var3 = ((char *) var2)[45];
  ((int *) arg2)[1] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[45];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[2];
    if (arg2 == var8)
    {
      ((int *) var5)[2] = var1;
    }
    else
    {
      ((int *) var5)[1] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[2] = arg2;
  return;
}

/**
 * Subroutine at address 0x00032288
 */
void sub_32288 (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x00032298
 */
void sub_32298 (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x000322A8
 */
void sub_322A8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 == 0x00000000)
  {
    ra = ((int *) sp)[0];
  }
  else
  {
    var2 = ((int *) arg1)[1];
    var3 = var2 + 0xFFFFFFFF;
    if (var3 < 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 >= 0))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_6690204E (var1);
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000322E8
 */
void sub_322E8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 == 0x00000000)
  {
    ra = ((int *) sp)[0];
  }
  else
  {
    var2 = ((int *) arg1)[1];
    var3 = var2 + 0xFFFFFFFF;
    if (var3 < 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 >= 0))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_6690204E (var1);
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032328
 */
void sub_32328 (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_32388 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032348
 */
void sub_32348 (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_323A8 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032368
 */
void sub_32368 (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_323D8 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032388
 */
void sub_32388 (int arg1)
{
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    var2 = ((int *) var1)[1];
    ((int *) var1)[1] = (var2 + 0x00000001);
  }
  return;
}

/**
 * Subroutine at address 0x000323A8
 */
void sub_323A8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 != 0x00000000)
  {
    scePaf_137D0EB1 (var1);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000323D8
 */
void sub_323D8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 != 0x00000000)
  {
    scePaf_137D0EB1 (var1);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032408
 */
void sub_32408 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[0];
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  ((int *) arg1)[0] = var1;
  sub_32388 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032428
 */
void sub_32428 (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_32538 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032448
 */
void sub_32448 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 == 0x00000000)
    {
      ((int *) var3)[0] = var1;
    }
    else
    {
      var4 = ((int *) var2)[1];
      var5 = var4 + 0xFFFFFFFF;
      ((int *) var2)[1] = var5;
      if (var5 <= 0)
      {
        var10 = ((int *) var2)[0];
        var11 = ((int *) var10)[1];
        var14 var15 = (*var11) (var2, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        ((int *) var3)[0] = var1;
      }
      else
      {
        ((int *) var3)[0] = var1;
      }
    }
    sub_32388 (var3);
  }
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000324C0
 */
void sub_324C0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 == 0x00000000)
    {
      ((int *) var3)[0] = var1;
    }
    else
    {
      var4 = ((int *) var2)[1];
      var5 = var4 + 0xFFFFFFFF;
      ((int *) var2)[1] = var5;
      if (var5 <= 0)
      {
        var10 = ((int *) var2)[0];
        var11 = ((int *) var10)[1];
        var14 var15 = (*var11) (var2, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        ((int *) var3)[0] = var1;
      }
      else
      {
        ((int *) var3)[0] = var1;
      }
    }
    sub_32538 (var3);
  }
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032538
 */
void sub_32538 (int arg1)
{
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    var2 = ((int *) var1)[1];
    ((int *) var1)[1] = (var2 + 0x00000001);
  }
  return;
}

/**
 * Subroutine at address 0x00032558
 */
void sub_32558 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = arg3;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_5E00570F ((((var3 + arg3) + 0x00000001) << 0x00000001));
  var7 = var6;
  var8 = ((int *) var1)[1];
  var9 = ((int *) var1)[0];
  scePaf_3447707B (var7, var9, (var8 << 0x00000001));
  var12 = ((int *) var1)[1];
  scePaf_3447707B ((var7 + (var12 << 0x00000001)), arg2, (var2 << 0x00000001));
  var15 = ((int *) var1)[1];
  var16 = ((int *) var1)[0];
  ((short *) (((var15 + var2) << 0x00000001) + var7))[0] = 0x00000000;
  if (!(var16 == 0x00000000))
  {
    scePaf_6690204E (var16);
  }
  ((int *) var1)[0] = var7;
  ((int *) var1)[1] = (var8 + var2);
  ra = ((int *) sp)[5];
  var19 = ((int *) sp)[4];
  var20 = ((int *) sp)[3];
  var21 = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032624
 */
void sub_32624 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_5E00570F ((((var3 + arg2) + 0x00000001) << 0x00000001));
  var7 = var6;
  var8 = ((int *) var1)[1];
  var9 = ((int *) var1)[0];
  scePaf_3447707B (var7, var9, (var8 << 0x00000001));
  var12 = 0x00000000;
  if (var2 == 0x00000000)
  {
    var13 = ((int *) var1)[1];
  }
  else
  {
    var13 = ((int *) var1)[1];
    var14 = (var13 << 0x00000001) + var7;
    while (1) {
      var12 = var12 + 0x00000001;
      ((short *) var14)[0] = (arg3 & 0x0000FFFF);
      var14 = var14 + 0x00000002;
      if (((var12 < var2)) != 0x00000000)
        continue;
      break;
    }
  }
  var15 = ((int *) var1)[0];
  ((short *) (((var13 + var2) << 0x00000001) + var7))[0] = 0x00000000;
  if (!(var15 == 0x00000000))
  {
    scePaf_6690204E (var15);
  }
  ((int *) var1)[0] = var7;
  ((int *) var1)[1] = (var8 + var2);
  ra = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032700
 */
void sub_32700 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = sub_32918 (arg2, arg3);
  ((int *) var1)[0] = var4;
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032738
 */
int sub_32738 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_31940 (var1, arg2);
  var4 = sp;
  ((int *) sp)[3] = s1;
  var7 = sub_329F0 (arg1, var4, 0x00000000);
  var8 = sp;
  sub_317D8 (var8);
  ra = ((int *) sp)[6];
  var11 = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return (var7 + 0x00000018);
}

/**
 * Subroutine at address 0x000327A0
 */
void sub_327A0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg2)[0];
  if (var1 != 0x00000000)
  {
    sub_32BE0 (arg1, (var1 + 0x0000000C));
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000327D0
 */
int sub_327D0 (int arg1)
{
  var1 = ((int *) arg1)[2];
  var2 = ((char *) var1)[29];
  if (var2 != 0x00000000)
  {
    var8 = ((int *) arg1)[0];
    var9 = ((char *) var8)[29];
    if (var9 != 0x00000000)
    {
      var11 = ((int *) arg1)[0];
    }
    else
    {
      var10 = ((int *) var8)[1];
      var11 = var8;
      if (!(var10 == arg1))
      {
        var12 = var11;
        while (1) {
          var11 = ((int *) var11)[0];
          var13 = ((char *) var11)[29];
          if (var13 != 0x00000000)
            break;
          var14 = ((int *) var11)[1];
          if (var14 != var12)
          {
            var12 = var11;
            continue;
          }
          else
          {
          }
        }
      }
    }
    var7 = var11;
  }
  else
  {
    var3 = var1;
    var4 = ((int *) var1)[1];
    var5 = ((char *) var4)[29];
    if (!(var5 != 0x00000000))
    {
      var3 = var4;
      while (1) {
        var4 = ((int *) var4)[1];
        var6 = ((char *) var4)[29];
        if (!(var6 == 0x00000000))
          break;
        var3 = var4;
        continue;
      }
    }
    var7 = var3;
  }
  return var7;
}

/**
 * Subroutine at address 0x00032850
 */
void sub_32850 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[29];
  var4 = arg1;
  if (!(var3 != 0x00000000))
  {
    var5 = ((int *) var2)[1];
    while (1) {
      var6 = ((char *) var5)[29];
      if (var6 == 0x00000000)
      {
        var2 = var5;
      }
      else
      {
        var7 = ((int *) var2)[2];
        var8 = ((char *) var7)[29];
        if (var8 != 0x00000000)
        {
          var15 = ((int *) var2)[0];
          var16 = ((char *) var15)[29];
          if (!(var16 != 0x00000000))
          {
            var17 = ((int *) var15)[1];
            if (var17 == var2)
            {
              var23 = ((int *) var4)[0];
              ((int *) var15)[1] = var23;
            }
            else
            {
              var18 = ((int *) var4)[0];
              ((int *) var15)[2] = var18;
            }
          }
          sub_317D8 ((var2 + 0x0000000C));
          scePaf_6690204E (var2);
          var2 = var15;
        }
        else
        {
          var2 = var7;
        }
      }
      var9 = ((char *) var2)[29];
      if (!(var9 == 0x00000000))
        break;
      var5 = ((int *) var2)[1];
      continue;
    }
    var1 = ((int *) var4)[0];
  }
  ((int *) var1)[0] = var1;
  var10 = ((int *) var4)[0];
  ((int *) var4)[1] = 0x00000000;
  ((int *) var10)[1] = var10;
  ra = ((int *) sp)[3];
  var11 = ((int *) var4)[0];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[2];
  var14 = ((int *) sp)[0];
  ((int *) var11)[2] = var11;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032918
 */
int sub_32918 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[7] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[0];
  var3 = ((char *) var2)[29];
  var4 = arg2;
  if (var3 != 0x00000000)
  {

  label23:
    var11 = var2;
  }
  else
  {
    var5 = ((int *) var4)[0];
    while (1) {
      var6 = ((int *) var2)[3];
      var7 = ((char *) var5)[0];
      var8 = ((char *) var6)[0];
      var9 = 0x00000000;
      if (((var7 < var8)) == 0x00000000)
      {
        var25 = scePaf_E3D530AE (var5, var6);
        if (!(var25 >= 0))
        {
          var9 = 0x00000001;
        }
      }
      else
      {
        var9 = 0x00000001;
      }
      if (var9 == 0x00000000)
      {
        var15 = ((int *) var2)[3];
        var16 = ((int *) var4)[0];
        var17 = ((char *) var15)[0];
        var18 = ((char *) var16)[0];
        var19 = 0x00000000;
        if (((var17 < var18)) == 0x00000000)
        {
          var22 = scePaf_E3D530AE (var15, var16);
          if (!(var22 >= 0))
          {
            var19 = 0x00000001;
          }
        }
        else
        {
          var19 = 0x00000001;
        }
        var11 = var2;
        if (var19 == 0x00000000)
          break;
        var2 = ((int *) var2)[2];

      label21:
        var10 = ((char *) var2)[29];
        if (!(var10 == 0x00000000))
          goto label23;
        var5 = ((int *) var4)[0];
        continue;
      }
      else
      {
        var2 = ((int *) var2)[1];
        goto label21;
      }
    }
  }
  ra = ((int *) sp)[7];
  var12 = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var11;
}

/**
 * Subroutine at address 0x000329F0
 */
int sub_329F0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s6;
  var1 = arg3;
  ((int *) sp)[9] = s5;
  var2 = arg1;
  ((int *) sp)[8] = s4;
  var3 = 0x00000000;
  ((int *) sp)[7] = s3;
  ((int *) sp)[11] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var4 = ((int *) arg1)[0];
  var5 = ((int *) var4)[0];
  var6 = ((char *) var5)[29];
  var7 = arg2;
  if (var6 != 0x00000000)
  {

  label26:
    var16 = scePaf_5E00570F (0x00000020);
    var5 = var16;
    if (!(var16 == 0x00000000))
    {
      var17 = ((int *) var2)[0];
      var18 = var16 + 0x0000000C;
      ((int *) var5)[0] = var4;
      ((int *) var16)[2] = var17;
      ((int *) var5)[1] = var17;
      ((int *) var5)[3] = 0x00000000;
      ((int *) var18)[1] = 0x00000000;
      sub_31940 (var18, var7);
      var21 = ((int *) var7)[3];
      ((int *) var18)[3] = var21;
      ((char *) var5)[28] = 0x00000001;
      ((char *) var5)[29] = 0x00000000;
    }
    if (var3 != 0x00000000)
    {
      if (var3 < 0)
      {
        ((int *) var4)[1] = var5;
        var38 = ((int *) var2)[0];
        var39 = ((int *) var38)[1];
        if (var4 == var39)
        {
          ((int *) var38)[1] = var5;

        label42:
          var25 = ((int *) var2)[1];
        }
        else
        {
          var25 = ((int *) var2)[1];
        }
      }
      else
      {
        ((int *) var4)[2] = var5;
        var36 = ((int *) var2)[0];
        var37 = ((int *) var36)[2];
        if (var4 == var37)
        {
          ((int *) var36)[2] = var5;
          goto label42;
        }
        else
        {
          var25 = ((int *) var2)[1];
        }
      }
    }
    else
    {
      var22 = ((int *) var2)[0];
      ((int *) var22)[0] = var5;
      var23 = ((int *) var2)[0];
      ((int *) var23)[1] = var5;
      var24 = ((int *) var2)[0];
      ((int *) var24)[2] = var5;
      goto label42;
    }
    ((int *) var2)[1] = (var25 + 0x00000001);
    sub_32C24 (var2, var5);
    if (!(var1 == 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
    }

  label47:
    var28 = var5;
  }
  else
  {
    var8 = ((int *) var7)[0];
    while (1) {
      var9 = ((int *) var5)[3];
      var4 = var5;
      var10 = ((char *) var8)[0];
      var11 = ((char *) var9)[0];
      var12 = 0x00000000;
      if (((var10 < var11)) == 0x00000000)
      {
        var50 = scePaf_E3D530AE (var8, var9);
        if (!(var50 >= 0))
        {
          var12 = 0x00000001;
        }
      }
      else
      {
        var12 = 0x00000001;
      }
      if (var12 == 0x00000000)
      {
        var40 = ((int *) var5)[3];
        var41 = ((int *) var7)[0];
        var42 = ((char *) var40)[0];
        var43 = ((char *) var41)[0];
        var44 = 0x00000000;
        if (((var42 < var43)) == 0x00000000)
        {
          var47 = scePaf_E3D530AE (var40, var41);
          if (!(var47 >= 0))
          {
            var44 = 0x00000001;
          }
        }
        else
        {
          var44 = 0x00000001;
        }
        var3 = 0x00000001;
        if (var44 == 0x00000000)
        {
          if (var1 != 0x00000000)
          {
            ((char *) var1)[0] = 0x00000000;
            goto label47;
          }
          else
          {
            var28 = var5;
          }
        }
        else
        {
          var5 = ((int *) var5)[2];

        label24:
          var13 = ((char *) var5)[29];
          if (!(var13 == 0x00000000))
            break;
          var8 = ((int *) var7)[0];
          continue;
        }
      }
      else
      {
        var5 = ((int *) var5)[1];
        var3 = 0xFFFFFFFF;
        goto label24;
      }
      goto label48;
    }
    goto label26;
  }

label48:
  ra = ((int *) sp)[11];
  var29 = ((int *) sp)[10];
  var30 = ((int *) sp)[9];
  var31 = ((int *) sp)[8];
  var32 = ((int *) sp)[7];
  var33 = ((int *) sp)[6];
  var34 = ((int *) sp)[5];
  var35 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var28;
}

/**
 * Subroutine at address 0x00032BE0
 */
void sub_32BE0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_32918 (arg1, arg2);
  var4 = ((char *) var3)[29];
  if (var4 == 0x00000000)
  {
    sub_32D5C (arg1, var3);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032C24
 */
void sub_32C24 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((char *) arg2)[28] = 0x00000001;
  var2 = ((int *) arg1)[0];
  var3 = ((int *) var2)[0];
  var4 = arg2;
  if (arg2 == var3)
  {

  label32:
    ra = ((int *) sp)[3];
  }
  else
  {
    var5 = ((int *) arg2)[0];
    var6 = ((char *) var5)[28];
    var7 = var5;
    if (var6 == 0x00000000)
    {

    label31:
      var3 = ((int *) var2)[0];
      goto label32;
    }
    else
    {
      while (1) {
        var8 = ((int *) var5)[0];
        var9 = ((int *) var8)[1];
        if (var5 == var9)
        {
          var9 = ((int *) var8)[2];
          var21 = ((char *) var9)[28];
          if (var21 != 0x00000000)
          {
            var4 = var8;

          label28:
            ((char *) var5)[28] = 0x00000000;
            ((char *) var9)[28] = 0x00000000;
            ((char *) var8)[28] = 0x00000001;
            var2 = ((int *) var1)[0];
          }
          else
          {
            var22 = ((int *) var5)[2];
            if (var4 == var22)
            {
              var4 = var5;
              sub_32F90 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var23 = ((int *) var7)[0];
            ((char *) var7)[28] = 0x00000000;
            ((char *) var23)[28] = 0x00000001;
            sub_32FE4 (var1, var23);
            var2 = ((int *) var1)[0];
          }
        }
        else
        {
          var10 = ((char *) var9)[28];
          if (var10 == 0x00000000)
          {
            var15 = ((int *) var5)[1];
            if (var4 == var15)
            {
              var4 = var5;
              sub_32FE4 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var16 = ((int *) var7)[0];
            ((char *) var7)[28] = 0x00000000;
            ((char *) var16)[28] = 0x00000001;
            sub_32F90 (var1, var16);
            var2 = ((int *) var1)[0];
          }
          else
          {
            var4 = var8;
            goto label28;
          }
        }
        var3 = ((int *) var2)[0];
        ra = ((int *) sp)[3];
        if (var4 == var3)
          break;
        var5 = ((int *) var4)[0];
        var11 = ((char *) var5)[28];
        var7 = var5;
        if (var11 != 0x00000000)
          continue;
        goto label31;
      }
    }
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  ((char *) var3)[28] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032D5C
 */
void sub_32D5C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg2)[1];
  var3 = ((char *) var2)[29];
  var4 = arg2;
  if (var3 != 0x00000000)
  {

  label10:
    var7 = ((int *) var4)[0];
    var8 = var4;

  label11:
    var9 = var7;
  }
  else
  {
    var5 = ((int *) arg2)[2];
    var6 = ((char *) var5)[29];
    if (!(var6 == 0x00000000))
      goto label10;
    var57 = ((int *) var5)[1];
    var58 = ((char *) var57)[29];
    if (var58 == 0x00000000)
    {
      var61 = sub_327D0 (arg2);
      var7 = ((int *) var61)[0];
      var8 = var61;
      goto label11;
    }
    else
    {
      var7 = var5;
      var9 = ((int *) var5)[0];
      var8 = var7;
    }
  }
  var10 = ((int *) var8)[1];
  var11 = ((char *) var10)[29];
  var12 = var10;
  if (!(var11 == 0x00000000))
  {
    var12 = ((int *) var8)[2];
  }
  var13 = ((char *) var12)[29];
  if (var13 != 0x00000000)
  {
    var14 = ((char *) var9)[29];
  }
  else
  {
    ((int *) var12)[0] = var9;
    var9 = ((int *) var8)[0];
    var14 = ((char *) var9)[29];
  }
  if (var14 == 0x00000000)
  {
    var56 = ((int *) var9)[1];
    if (var56 == var8)
    {
      ((int *) var9)[1] = var12;
    }
    else
    {
      ((int *) var9)[2] = var12;
    }
  }
  else
  {
    var15 = ((int *) var1)[0];
    ((int *) var15)[0] = var12;
  }
  var16 = ((char *) var8)[28];
  if (!(var8 == var4))
  {
    var17 = ((int *) var4)[0];
    ((int *) var8)[0] = var17;
    var18 = ((int *) var4)[0];
    var19 = ((char *) var18)[29];
    if (var19 == 0x00000000)
    {
      var55 = ((int *) var18)[1];
      if (var55 == var4)
      {
        ((int *) var18)[1] = var8;
      }
      else
      {
        ((int *) var18)[2] = var8;
      }
    }
    else
    {
      var20 = ((int *) var1)[0];
      ((int *) var20)[0] = var8;
    }
    var21 = ((int *) var4)[1];
    ((int *) var8)[1] = var21;
    var22 = ((int *) var4)[1];
    var23 = ((char *) var22)[29];
    if (var23 == 0x00000000)
    {
      ((int *) var22)[0] = var8;
    }
    var24 = ((int *) var4)[2];
    ((int *) var8)[2] = var24;
    var25 = ((int *) var4)[2];
    var26 = ((char *) var25)[29];
    if (var26 == 0x00000000)
    {
      ((int *) var25)[0] = var8;
    }
    var27 = ((unsigned char *) var4)[28];
    ((char *) var8)[28] = var27;
  }
  if ((!(var16) ? 0x00000001 : 0x00000000) != 0x00000000)
  {
    sub_33038 (var1, var12, var7);
    var28 = ((int *) var1)[0];
  }
  else
  {
    var28 = ((int *) var1)[0];
  }
  var29 = ((int *) var28)[1];
  if (var29 == var4)
  {
    var46 = ((char *) var12)[29];
    var47 = var7;
    if (!(var46 != 0x00000000))
    {
      var48 = ((int *) var12)[1];
      var49 = ((char *) var48)[29];
      var50 = var12;
      if (!(var49 != 0x00000000))
      {
        var51 = var48;
        var50 = var51;
        while (1) {
          var51 = ((int *) var51)[1];
          var52 = ((char *) var51)[29];
          if (!(var52 == 0x00000000))
            break;
          var50 = var51;
          continue;
        }
      }
      var47 = var50;
    }
    ((int *) (var28 + 0x00000004))[0] = var47;
    var28 = ((int *) var1)[0];
  }
  var30 = ((int *) var28)[2];
  if (var30 == var4)
  {
    var41 = ((char *) var12)[29];
    var42 = var7;
    if (!(var41 != 0x00000000))
    {
      var43 = ((int *) var12)[2];
      var44 = ((char *) var43)[29];
      var42 = var12;
      if (!(var44 != 0x00000000))
      {
        var42 = var43;
        while (1) {
          var43 = ((int *) var43)[2];
          var45 = ((char *) var43)[29];
          if (!(var45 == 0x00000000))
            break;
          var42 = var43;
          continue;
        }
      }
    }
    ((int *) (var28 + 0x00000008))[0] = var42;
  }
  sub_317D8 ((var4 + 0x0000000C));
  scePaf_6690204E (var4);
  var35 = ((int *) var1)[1];
  ra = ((int *) sp)[5];
  var36 = ((int *) sp)[4];
  ((int *) var1)[1] = (var35 + 0xFFFFFFFF);
  var37 = ((int *) sp)[3];
  var38 = ((int *) sp)[2];
  var39 = ((int *) sp)[1];
  var40 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032F90
 */
void sub_32F90 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[2];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[29];
  ((int *) arg2)[2] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[29];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[1];
    if (arg2 == var8)
    {
      ((int *) var5)[1] = var1;
    }
    else
    {
      ((int *) var5)[2] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[1] = arg2;
  return;
}

/**
 * Subroutine at address 0x00032FE4
 */
void sub_32FE4 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[1];
  var2 = ((int *) var1)[2];
  var3 = ((char *) var2)[29];
  ((int *) arg2)[1] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[29];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[2];
    if (arg2 == var8)
    {
      ((int *) var5)[2] = var1;
    }
    else
    {
      ((int *) var5)[1] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[2] = arg2;
  return;
}

/**
 * Subroutine at address 0x00033038
 */
void sub_33038 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  var2 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  var3 = ((char *) arg3)[29];
  var4 = arg3;
  if (var3 != 0x00000000)
  {

  label46:
    ra = ((int *) sp)[4];
  }
  else
  {
    var5 = ((char *) arg2)[28];
    if (var5 != 0x00000000)
      goto label46;
    var6 = ((int *) var4)[1];
    while (1) {
      if (var6 == var1)
      {
        var8 = ((int *) var4)[2];
        var31 = ((char *) var8)[28];
        if (var31 != 0x00000000)
        {
          ((char *) var8)[28] = 0x00000000;
          var43 = ((int *) var8)[1];
          ((char *) var4)[28] = 0x00000001;
          sub_32F90 (var2, var4);
          var8 = var43;
        }
        var32 = ((int *) var8)[1];
        var33 = ((char *) var32)[28];
        var34 = var32;
        if (var33 != 0x00000000)
        {
          var35 = ((int *) var8)[2];

        label16:
          var37 = ((char *) var35)[28];
          if (var37 == 0x00000000)
          {
            ((char *) var34)[28] = 0x00000000;
            ((char *) var8)[28] = 0x00000001;
            sub_32FE4 (var2, var8);
            var35 = ((int *) var34)[2];
            var8 = var34;
          }
          var38 = ((unsigned char *) var4)[28];
          ((char *) var8)[28] = var38;
          ((char *) var4)[28] = 0x00000000;
          ((char *) var35)[28] = 0x00000000;
          sub_32F90 (var2, var4);
          var24 = ((int *) var2)[0];

        label40:
          var1 = ((int *) var24)[0];
          var4 = ((int *) var1)[0];
        }
        else
        {
          var35 = ((int *) var8)[2];
          var36 = ((char *) var35)[28];
          if (!(var36 == 0x00000000))
            goto label16;
          var1 = var4;

        label42:
          var4 = ((int *) var4)[0];
          ((char *) var8)[28] = 0x00000001;
        }
      }
      else
      {
        var7 = ((char *) var6)[28];
        var8 = var6;
        if (var7 != 0x00000000)
        {
          ((char *) var6)[28] = 0x00000000;
          var28 = ((int *) var8)[2];
          ((char *) var4)[28] = 0x00000001;
          sub_32FE4 (var2, var4);
          var8 = var28;
        }
        var9 = ((int *) var8)[1];
        var10 = ((char *) var9)[28];
        var11 = var9;
        if (var10 != 0x00000000)
        {
          var20 = ((char *) var11)[28];

        label32:
          if (var20 == 0x00000000)
          {
            var25 = ((int *) var8)[2];
            ((char *) var25)[28] = 0x00000000;
            ((char *) var8)[28] = 0x00000001;
            sub_32F90 (var2, var8);
            var9 = ((int *) var25)[1];
            var8 = var25;
          }
          var21 = ((unsigned char *) var4)[28];
          ((char *) var8)[28] = var21;
          ((char *) var4)[28] = 0x00000000;
          ((char *) var9)[28] = 0x00000000;
          sub_32FE4 (var2, var4);
          var24 = ((int *) var2)[0];
          goto label40;
        }
        else
        {
          var12 = ((int *) var8)[2];
          var13 = ((char *) var12)[28];
          if (var13 != 0x00000000)
          {
            var20 = ((char *) var11)[28];
            goto label32;
          }
          else
          {
            var1 = var4;
            goto label42;
          }
        }
      }
      var14 = ((char *) var4)[29];
      ra = ((int *) sp)[4];
      if (!(var14 != 0x00000000))
      {
        var15 = ((char *) var1)[28];
        if (!(var15 == 0x00000000))
          break;
        var6 = ((int *) var4)[1];
        continue;
      }
      goto label47;
    }
    goto label46;
  }

label47:
  var16 = ((int *) sp)[3];
  var17 = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  ((char *) var1)[28] = 0x00000000;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033200
 */
void sub_33200 (int arg1)
{
  ((int *) arg1)[0] = 0x00045428;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  ThreadManForUser_19CFF145 ((arg1 + 0x00000004), "ScePafMutex", 0x00000100, 0x00000000, 0x00000000);
  ((int *) arg1)[0] = 0x00045410;
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033254
 */
void sub_33254 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_33270 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033270
 */
void sub_33270 (int arg1)
{
  ((int *) arg1)[1] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_5E00570F (0x00000020);
  ((int *) var1)[0] = var4;
  ((int *) var4)[0] = var4;
  var5 = ((int *) var1)[0];
  ra = ((int *) sp)[1];
  ((int *) var5)[1] = var5;
  var6 = ((int *) var1)[0];
  ((int *) var6)[2] = var6;
  var7 = ((int *) var1)[0];
  ((char *) var7)[28] = 0x00000000;
  var8 = ((int *) var1)[0];
  var9 = ((int *) sp)[0];
  ((char *) var8)[29] = 0x00000001;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000332C8
 */
void sub_332C8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_33470 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000332E4
 */
void sub_332E4 (int arg1)
{
  ((int *) arg1)[0] = 0x00045440;
  return;
}

/**
 * Subroutine at address 0x000332F4
 */
void sub_332F4 (int arg1)
{
  ((int *) arg1)[0] = 0x00045440;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_4508F2FA (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003331C
 */
void sub_3331C (int arg1)
{
  ((int *) arg1)[0] = 0x00045428;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) arg1)[0] = 0x00045440;
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003335C
 */
void sub_3335C (int arg1)
{
  ((int *) arg1)[0] = 0x00045428;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) var1)[0] = 0x00045440;
  scePaf_4508F2FA (var1);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000333A4
 */
void sub_333A4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  Kernel_Library_BEA46419 ((arg1 + 0x00000004), 0x00000001, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000333C8
 */
void sub_333C8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  Kernel_Library_15B6446B ((arg1 + 0x00000004), 0x00000001);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000333E8
 */
void sub_333E8 (int arg1)
{
  ((int *) arg1)[0] = 0x00045428;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) var1)[0] = 0x00045440;
  scePaf_4508F2FA (var1);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033430
 */
void sub_33430 (int arg1)
{
  ((int *) arg1)[0] = 0x00045428;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) arg1)[0] = 0x00045440;
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033470
 */
void sub_33470 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_32850 (arg1);
  var3 = ((int *) arg1)[0];
  scePaf_6690204E (var3);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003349C
 */
void sub_3349C (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x000334AC
 */
void sub_334AC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = ((int *) arg1)[0];
  ra = ((int *) sp)[3];
  if (!(var2 == 0x00000000))
  {
    var3 = ((int *) var1)[1];
    var4 = var3 + 0xFFFFFFFF;
    var5 = ((var4 << 0x00000001) + var4) << 0x00000002;
    if (!(var4 < 0))
    {
      while (1) {
        var4 = var4 + 0xFFFFFFFF;
        sub_317D8 ((var2 + var5));
        var5 = var5 + 0xFFFFFFF4;
        if (var4 < 0)
          break;
        var2 = ((int *) var1)[0];
        continue;
      }
      var8 = ((int *) var1)[0];
    }
    scePaf_6690204E (var8);
    ra = ((int *) sp)[3];
  }
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033528
 */
int sub_33528 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = arg3;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_5E00570F (((var3 + arg3) + 0x00000001));
  var7 = var6;
  var8 = ((int *) var1)[1];
  var9 = ((int *) var1)[0];
  scePaf_3447707B (var7, var9, var8);
  var12 = ((int *) var1)[1];
  scePaf_3447707B ((var7 + var12), arg2, var2);
  var15 = ((int *) var1)[1];
  ((char *) (var7 + (var15 + var2)))[0] = 0x00000000;
  var16 = ((int *) var1)[0];
  if (!(var16 == 0x00000000))
  {
    scePaf_6690204E (var16);
  }
  ((int *) var1)[0] = var7;
  ((int *) var1)[1] = (var8 + var2);
  ra = ((int *) sp)[5];
  var19 = ((int *) sp)[4];
  var20 = ((int *) sp)[3];
  var21 = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x000335E8
 */
void sub_335E8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    scePaf_6690204E (var1);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033618
 */
void sub_33618 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (!(arg2 == 0x00000000))
  {
    var1 = scePaf_937DE11C (arg2);
  }
  sub_33704 (arg1, arg2, var1);
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033668
 */
void sub_33668 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[3] = ra;
  var3 = ((int *) arg1)[0];
  if (!(var3 == 0x00000000))
  {
    scePaf_6690204E (var3);
  }
  var6 = ((int *) var2)[1];
  if (var6 != 0x00000000)
  {
    var12 = scePaf_5E00570F (((var6 + 0x00000001) << 0x00000001));
    ((int *) var1)[0] = var12;
    var13 = ((int *) var2)[1];
    var14 = ((int *) var2)[0];
    ((int *) var1)[1] = var13;
    scePaf_3447707B (var12, var14, ((var13 << 0x00000001) + 0x00000002));
  }
  else
  {
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033704
 */
void sub_33704 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  var3 = arg1;
  ((int *) sp)[4] = ra;
  var4 = ((int *) arg1)[0];
  if (!(var4 == 0x00000000))
  {
    scePaf_6690204E (var4);
  }
  if (var2 == 0x00000000)
  {

  label12:
    ((int *) var3)[0] = 0x00000000;
    ((int *) var3)[1] = 0x00000000;
  }
  else
  {
    var7 = ((unsigned short *) var2)[0];
    var8 = var1 << 0x00000001;
    if (!(var7 != 0x00000000))
      goto label12;
    var15 = scePaf_5E00570F (((var1 + 0x00000001) << 0x00000001));
    ((int *) var3)[0] = var15;
    ((int *) var3)[1] = var1;
    scePaf_3447707B (var15, var2, var8);
    var18 = ((int *) var3)[0];
    ((short *) (var8 + var18))[0] = 0x00000000;
  }
  ra = ((int *) sp)[4];
  var9 = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000337B8
 */
void sub_337B8 (int arg1)
{
  ((int *) arg1)[0] = 0x00045458;
  return;
}

/**
 * Subroutine at address 0x000337C8
 */
void sub_337C8 (int arg1)
{
  ((int *) arg1)[0] = 0x00045458;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_4508F2FA (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000337F0
 */
void sub_337F0 (int arg1)
{
  ((int *) arg1)[1] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_5E00570F (0x0000000C);
  ((int *) var1)[0] = var4;
  ((int *) var4)[0] = var4;
  ra = ((int *) sp)[1];
  var5 = ((int *) var1)[0];
  var6 = ((int *) sp)[0];
  ((int *) var5)[1] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003382C
 */
void sub_3382C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  if (!(var2 == var1))
  {
    while (1) {
      var3 = ((int *) var2)[1];
      scePaf_6690204E (var2);
      var6 = ((int *) arg1)[0];
      var2 = var3;
      if (var3 != var6)
        continue;
      break;
    }
  }
  scePaf_6690204E (var6);
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033884
 */
void sub_33884 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  var1 = ((int *) arg3)[0];
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  var4 = ((int *) var1)[1];
  var5 = ((int *) var1)[0];
  ((int *) var4)[0] = var5;
  var6 = ((int *) var1)[0];
  ((int *) var6)[1] = var4;
  scePaf_6690204E (var1);
  var9 = ((int *) var2)[1];
  ((int *) var3)[0] = var4;
  ((int *) var2)[1] = (var9 + 0xFFFFFFFF);
  ra = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000338EC
 */
void sub_338EC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg1;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  var3 = ((int *) arg3)[0];
  var6 = scePaf_5E00570F (0x0000000C);
  var7 = var6;
  if ((var6 + 0x00000008) == 0x00000000)
  {
    var9 = ((int *) var3)[0];
  }
  else
  {
    var8 = ((int *) arg4)[0];
    ((int *) var7)[2] = var8;
    var9 = ((int *) var3)[0];
  }
  var10 = ((int *) var2)[1];
  ((int *) var7)[1] = var3;
  ((int *) var7)[0] = var9;
  var11 = ((int *) var3)[0];
  ((int *) var2)[1] = (var10 + 0x00000001);
  ((int *) var3)[0] = var7;
  ((int *) var11)[1] = var7;
  ra = ((int *) sp)[4];
  ((int *) var1)[0] = var7;
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[3];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003397C
 */
void sub_3397C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 != 0x00000000)
    {
      scePaf_65FDC4C5 (var2);
      ((int *) var3)[0] = var1;
    }
    else
    {
      ((int *) var3)[0] = var1;
    }
    sub_323A8 (var3);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000339D8
 */
void sub_339D8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 != 0x00000000)
    {
      scePaf_65FDC4C5 (var2);
      ((int *) var3)[0] = var1;
    }
    else
    {
      ((int *) var3)[0] = var1;
    }
    sub_323D8 (var3);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033A34
 */
void sub_33A34 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_5E00570F (((var3 + arg2) + 0x00000001));
  var7 = var6;
  var8 = ((int *) var2)[1];
  var9 = ((int *) var2)[0];
  scePaf_3447707B (var7, var9, var8);
  var12 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    while (1) {
      var13 = ((int *) var2)[1];
      var12 = var12 + 0x00000001;
      ((char *) (var7 + (var13 + var12)))[0] = ((char) arg3);
      if (((var12 < var1)) != 0x00000000)
        continue;
      break;
    }
  }
  var14 = ((int *) var2)[1];
  ((char *) (var7 + (var14 + var1)))[0] = 0x00000000;
  var15 = ((int *) var2)[0];
  if (var15 == 0x00000000)
  {
    ((int *) var2)[0] = var7;
  }
  else
  {
    scePaf_6690204E (var15);
    ((int *) var2)[0] = var7;
  }
  ((int *) var2)[1] = (var8 + var1);
  ra = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033B04
 */
void sub_33B04 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg1)[2];
  ((int *) arg1)[0] = 0x00045468;
  if (var1 != 0x00000000)
  {
    var3 = ((int *) arg1)[3];
    scePaf_A1529507 (var3, 0x00000000, var1);
  }
  else
  {
  }
  ((int *) arg1)[0] = 0x00045478;
  ra = ((int *) sp)[1];
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033B5C
 */
void sub_33B5C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var2 = ((int *) arg1)[2];
  ((int *) arg1)[0] = 0x00045468;
  if (var2 != 0x00000000)
  {
    var6 = ((int *) arg1)[3];
    scePaf_A1529507 (var6, 0x00000000, var2);
  }
  else
  {
  }
  ((int *) var1)[0] = 0x00045478;
  scePaf_4508F2FA (var1);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033BBC
 */
void sub_33BBC (int arg1)
{
  ((int *) arg1)[0] = 0x00045478;
  return;
}

/**
 * Subroutine at address 0x00033BCC
 */
void sub_33BCC (int arg1)
{
  ((int *) arg1)[0] = 0x00045478;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_4508F2FA (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033BF4
 */
void sub_33BF4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[2];
  if (((var1 < arg2)) != 0x00000000)
  {
    sub_33DB8 (arg1, arg2);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033C28
 */
void sub_33C28 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg1)[0];
  ra = ((int *) sp)[3];
  if (!(var2 == 0x00000000))
  {
    var3 = ((int *) var1)[1];
    var4 = 0x00000000;
    var5 = 0x00000000;
    if (!(var3 <= 0))
    {
      while (1) {
        sub_317D8 ((var2 + var5));
        var8 = ((int *) var1)[1];
        var4 = var4 + 0x00000001;
        var5 = var5 + 0x0000000C;
        if (((var4 < var8)) == 0x00000000)
          break;
        var2 = ((int *) var1)[0];
        continue;
      }
      var9 = ((int *) var1)[0];
    }
    scePaf_6690204E (var9);
    ((int *) var1)[2] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ra = ((int *) sp)[3];
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033CB0
 */
void sub_33CB0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg1)[1];
  var2 = ((int *) arg1)[2];
  var3 = arg1;
  if (((var2 < (var1 + 0x00000001))) != 0x00000000)
  {
    sub_33DB8 (arg1, (var2 + 0x0000000A));
    var1 = ((int *) var3)[1];
  }
  var4 = ((int *) var3)[0];
  var5 = var4 + (((var1 << 0x00000001) + var1) << 0x00000002);
  if (!(var5 == 0x00000000))
  {
    ((int *) var5)[0] = 0x00000000;
    ((int *) var5)[1] = 0x00000000;
    sub_31940 (var5, arg2);
    var1 = ((int *) var3)[1];
  }
  ((int *) var3)[1] = (var1 + 0x00000001);
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033D44
 */
void sub_33D44 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[1];
  var3 = ((int *) arg1)[0];
  sub_317D8 (((var3 + (((var2 << 0x00000001) + var2) << 0x00000002)) + 0xFFFFFFF4));
  var6 = ((int *) var1)[1];
  var7 = ((int *) var1)[2];
  var8 = var6 + 0xFFFFFFFF;
  ((int *) var1)[1] = var8;
  if (((var8 < (var7 + 0xFFFFFFEC))) != 0x00000000)
  {
    sub_33DB8 (var1, (var7 + 0xFFFFFFF6));
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033DB8
 */
void sub_33DB8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (var2 != 0x00000000)
  {
    var15 = scePaf_5E00570F ((((arg2 << 0x00000001) + arg2) << 0x00000002));
    var16 = ((int *) var3)[1];
    var17 = var15;
    var18 = 0x00000000;
    if (var16 <= 0)
    {
      var19 = ((int *) var3)[0];
    }
    else
    {
      var19 = ((int *) var3)[0];
      var20 = 0x00000000;
      var21 = var17 + 0x00000000;
      while (1) {
        var18 = var18 + 0x00000001;
        var20 = var20 + 0x0000000C;
        if (!(var21 == 0x00000000))
        {
          ((int *) var21)[0] = 0x00000000;
          ((int *) var21)[1] = 0x00000000;
          sub_31940 (var21, (var19 + var20));
          var19 = ((int *) var3)[0];
          var16 = ((int *) var3)[1];
        }
        if (!(((var18 < var16)) != 0x00000000))
          break;
        var21 = var17 + var20;
        continue;
      }
    }
    var24 = 0x00000000;
    var25 = 0x00000000;
    if (!(var16 <= 0))
    {
      while (1) {
        sub_317D8 ((var19 + var25));
        var28 = ((int *) var3)[1];
        var24 = var24 + 0x00000001;
        var25 = var25 + 0x0000000C;
        if (((var24 < var28)) == 0x00000000)
          break;
        var19 = ((int *) var3)[0];
        continue;
      }
      var19 = ((int *) var3)[0];
    }
    scePaf_6690204E (var19);
    ((int *) var3)[2] = var1;
    ((int *) var3)[0] = var17;
  }
  else
  {
    var6 = scePaf_5E00570F ((((arg2 << 0x00000001) + arg2) << 0x00000002));
    ((int *) var3)[0] = var6;
    ((int *) var3)[2] = var1;
  }
  ra = ((int *) sp)[6];
  var7 = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  var9 = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033EDC
 */
void sub_33EDC (int arg1)
{
  ((int *) arg1)[0] = 0x00045488;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_334AC ((arg1 + 0x00000020));
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033F04
 */
void sub_33F04 (int arg1)
{
  ((int *) arg1)[0] = 0x00045488;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_334AC ((arg1 + 0x00000020));
  scePaf_4508F2FA (arg1);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033F40
 */
void sub_33F40 (int arg1)
{
  var1 = ((int *) arg1)[1];
  return;
}

/**
 * Subroutine at address 0x00033F48
 */
void sub_33F48 (int arg1)
{
  var1 = ((int *) arg1)[2];
  return;
}

/**
 * Subroutine at address 0x00033F50
 */
void sub_33F50 (int arg1)
{
  var1 = ((int *) arg1)[3];
  return;
}

/**
 * Subroutine at address 0x00033F58
 */
void sub_33F58 (int arg1)
{
  var1 = ((int *) arg1)[4];
  return;
}

/**
 * Subroutine at address 0x00033F60
 */
void sub_33F60 (int arg1)
{
  var1 = ((int *) arg1)[5];
  return;
}

/**
 * Subroutine at address 0x00033F68
 */
void sub_33F68 (int arg1)
{
  var1 = ((int *) arg1)[6];
  return;
}

/**
 * Subroutine at address 0x00033F70
 */
void sub_33F70 (int arg1)
{
  var1 = ((int *) arg1)[7];
  return;
}

/**
 * Subroutine at address 0x00033F78
 */
void sub_33F78 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  scePaf_27F4E35C (var1, arg2, 0x00000000, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033F9C
 */
void sub_33F9C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  scePaf_3C8DD7F0 (var1, arg2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033FB8
 */
void sub_33FB8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  scePaf_E305A594 (var1, arg2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033FD4
 */
void sub_33FD4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  var4 = scePaf_11FA6015 (var1, arg2, arg3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033FF0
 */
void sub_33FF0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var4 = scePaf_5E00570F (0x0000000C);
  var5 = var4;
  if ((var4 + 0x00000008) == 0x00000000)
  {
    var7 = ((int *) var1)[0];
  }
  else
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[2] = var6;
    var7 = ((int *) var1)[0];
  }
  var8 = ((int *) var1)[1];
  ra = ((int *) sp)[2];
  ((int *) var5)[0] = var7;
  var9 = ((int *) var1)[0];
  ((int *) var1)[1] = (var8 + 0x00000001);
  var10 = ((int *) var9)[1];
  var11 = ((int *) sp)[1];
  ((int *) var5)[1] = var10;
  var12 = ((int *) var1)[0];
  var13 = ((int *) var12)[1];
  ((int *) var13)[0] = var5;
  var14 = ((int *) var1)[0];
  var15 = ((int *) sp)[0];
  ((int *) var14)[1] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00034070
 */
void sub_34070 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var4 = scePaf_5E00570F (0x0000000C);
  var5 = var4;
  if ((var4 + 0x00000008) == 0x00000000)
  {
    var7 = ((int *) var1)[0];
  }
  else
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[2] = var6;
    var7 = ((int *) var1)[0];
  }
  var8 = ((int *) var1)[1];
  ra = ((int *) sp)[2];
  var9 = ((int *) var7)[0];
  ((int *) var1)[1] = (var8 + 0x00000001);
  ((int *) var5)[0] = var9;
  var10 = ((int *) var1)[0];
  var11 = ((int *) sp)[1];
  ((int *) var5)[1] = var10;
  var12 = ((int *) var1)[0];
  var13 = ((int *) var12)[0];
  ((int *) var13)[1] = var5;
  var14 = ((int *) var1)[0];
  var15 = ((int *) sp)[0];
  ((int *) var14)[0] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000340F0
 */
void sub_340F0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  var1 = arg1;
  ((int *) sp)[18] = ra;
  var2 = ((int *) arg1)[0];
  var3 = ((int *) var2)[1];
  ((int *) sp)[4] = var2;
  ((int *) sp)[0] = var3;
  if (!(var3 == var2))
  {
    while (1) {
      var4 = ((int *) var3)[2];
      var5 = ((int *) arg2)[0];
      var6 = sp + 0x00000020;
      var7 = sp + 0x00000030;
      if (var4 == var5)
      {
        ((int *) sp)[12] = var3;
        sub_3417C (var6, var1, var7);
        var2 = ((int *) var1)[0];
        var14 = ((int *) sp)[8];
        ((int *) sp)[0] = var14;
      }
      else
      {
        ((int *) sp)[12] = var3;
        var8 = ((int *) var3)[1];
        ((int *) sp)[0] = var8;
      }
      var9 = ((int *) sp)[0];
      ((int *) sp)[4] = var2;
      var3 = var9;
      if (var9 != var2)
        continue;
      break;
    }
  }
  ra = ((int *) sp)[18];
  var10 = ((int *) sp)[17];
  var11 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0003417C
 */
void sub_3417C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  var1 = ((int *) arg3)[0];
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  var4 = ((int *) var1)[1];
  var5 = ((int *) var1)[0];
  ((int *) var4)[0] = var5;
  var6 = ((int *) var1)[0];
  ((int *) var6)[1] = var4;
  scePaf_6690204E (var1);
  var9 = ((int *) var2)[1];
  ((int *) var3)[0] = var4;
  ((int *) var2)[1] = (var9 + 0xFFFFFFFF);
  ra = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000341E4
 */
void sub_341E4 (int arg1)
{
  ((int *) arg1)[1] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_5E00570F (0x0000000C);
  ((int *) var1)[0] = var4;
  ((int *) var4)[0] = var4;
  ra = ((int *) sp)[1];
  var5 = ((int *) var1)[0];
  var6 = ((int *) sp)[0];
  ((int *) var5)[1] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00034220
 */
void sub_34220 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  if (!(var2 == var1))
  {
    while (1) {
      var3 = ((int *) var2)[1];
      scePaf_6690204E (var2);
      var6 = ((int *) arg1)[0];
      var2 = var3;
      if (var3 != var6)
        continue;
      break;
    }
  }
  scePaf_6690204E (var6);
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00034278
 */
void sub_34278 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  sub_00024 ();
  ra = ((int *) sp)[5];
  sp = sp + 0x00000020;
  return;
}

